CSS Code

CSS tab of the WP Coder Pro editor with NAV comments, and the Output, Media Queries and Navigate panel

The CSS tab holds the styles of your snippet.

Tip: write only the rules — no <style> wrapper.


How the CSS is loaded#

By default, saving the snippet writes its CSS to a file in wp-content/uploads/wp-coder/, and the file is enqueued only on pages where the snippet is shown — everywhere, by a shortcode or a block (in Pro also by a Display Rule or a template). Pages without the snippet don’t load its CSS.

Once the snippet has saved CSS, the CSS File URL field shows the file’s address.

Inline#

Prints the CSS in a <style> tag on the page instead of loading a file.

Attribute variables ({{$name}}) and Global Variables ({{global.name}}) are replaced only in Inline mode PRO. In a file, the CSS is the same for every page, so placeholders stay as written. The free WP Coder prints inline CSS as written, without replacing placeholders.

In WP Coder Pro, use Inline when the styles depend on block fields:

.hero { background: {{$bg_color}}; min-height: {{$height}}px; }

Minified#

Removes spaces, comments and line breaks for a smaller file.

Combine PRO#

Merges this snippet’s CSS into one file per page, so a page with several snippets loads one stylesheet instead of many.

  • Combine and Inline can’t both be on — turning on Combine switches Inline off.
  • Combined files are rebuilt automatically when a snippet or post is saved, and when snippets are switched on or off. A combined file is used only when every snippet in it is shown to the current visitor.
  • After a migration or a backup restore, rebuild them with Tools → Developer → Rebuild Combined Files.

Add NAV Comment#

Inserts a /* NAV: */ marker. The editor lists the markers as a clickable outline of the stylesheet.

Media Queries PRO#

A helper that inserts ready-made @media blocks at the cursor.

  • max-width unticked (default) → min-width queries, mobile first; ticked → max-width, desktop first.
  • Four buttons insert a breakpoint:
Button Breakpoint
Mobile 40rem (640px)
Tablet 48rem (768px)
Desktop 64rem (1024px)
Wide 80rem (1280px)

CSS Help PRO#

A quick reference — no <style> tags, the media query helper, the Combine/Inline rule — and a table of the snippet’s attribute variables.