이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

CSS Above The Fold

설명

Improve user experience by having your above-the-fold (top of the page) CSS styles in-page.

Even if the rest of the CSS files take a seconds to load, these specific CSS styles displayed from the head section ensure a quick rendering of your page and better score in testing systems like Google Page Speed Insights.

But you do not need to maintain two separate stylesheets, just select specific fragments of your theme style file with a special markup to create an above-the-fold styles joining the CSS fragments in the head section.

This plugin enables a special open and close tags that you can insert editing your style.css theme file to surround pieces of code:

[css-above-the-fold]

… Your theme CSS code fragment …

[/css-above-the-fold]

But this syntax is not an standard CSS, so you need to include this tags between CSS comments, there are two ways to do it:

1. Comment whole section

The easiest way, the CSS is rendered only in the head but not in the stylesheet.
This kind of markup does not allow to use your own CSS comments inside the fragment.
Take care to use this way only when the plugin is active, because you are commenting some parts of your theme stylesheet.

/* [css-above-the-fold]

… CSS code fragment …

[/css-above-the-fold] */

2. Comment only the tags

The unobtrusive way, it allows you to include comments inside fragments, but the fragments are rendered both in the head section and the CSS file.
This way is plugin-independent, and your theme stylesheet will keep running with this plugin activated or not.

/* [css-above-the-fold] */

… CSS code fragment …

/* [/css-above-the-fold] */

You can use these two kinds of markup combined in your CSS File.

The resulting CSS fragments introduced in the header are compacted and minified.

This plugin only read the style.css file when it is modified, and stores the results using the WP options API.

스크린샷

  • A edited CSS file using Whole section commented fragment
  • A fragment commenting only the special markup
  • Styles in-page resulting of joining css theme fragments

설치

  1. Download the plugin from WordPress plugin repository
  2. Unzip and upload css-above-the-fold folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Edit your theme CSS file style.css following the instructions above

FAQ

My theme will be dependent on this plugin?

Only if you use the Comment whole section type of fragment selection. However, it is easily reversible uncommenting the sections.
If you want an independent stylesheet use the Comment only the tags technique.

Why is important rendering CSS file on the top of the page?

Prioritizing above-the-fold content it’s an important factor to speed-up your website, rankings improvement and conversion.

Why using this technique of selecting fragments from the theme stylesheet file?

The aim is simplicity, editing a single file avoids having to maintain two separate stylesheets.

And what CSS should I mark to display it “above-the-fold”?

That is the million dollar question, this plugin does not do this task automatically, only provides a method for easy and quick implementation.
There are some tools to help you in the process of select the rights fragments of code, and maybe you will have to modify your stylesheet structure to properly isolate these CSS fragments.
You can find a lot of resouces about this topic performing a simple Google search like “css above the fold”.

후기

모든 1 평가 읽기

기여자 & 개발자

“CSS Above The Fold”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “CSS Above The Fold”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.0

  • Initial Release.
  • Tested until WordPress 4.2