Custom CSS In Uploads Folder

If the theme is generating CSS based on theme options then it might choose to do this. Say your theme lets you pick a ‘primary colour’. It might want to style lots of elements in this colour. To do this it would need to output CSS with certain values substituted with your chosen colour. If … Read more

Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies

Because the WordPress hook add_theme_support( ‘editor-styles’ ); adds the css in the style-editor.css and appends the class .editor-styles-wrapper before my .wp-block, the usage of the body classes for page vs. post styles fails. Instead I use the answer from here, from David Walsh, to add the styles independently to the wp admin area: // Update … Read more

Enqueue styles after a plugin

Note that cForms is hooking into wp_head, and you’re attempting to hook into wp_enqueue_scripts. The wp_enqueue_scripts hook is fired inside the wp_head hook (at priority 0, IIRC). So, your stylesheet is being enqueued at wp_head, priority 0, and the cForms stylesheet is being enqueued at wp_head, priority 10. Since it outputs later, it is taking … Read more

CSS ?ver=4.6.1 not updating

The version number ?ver=4.6.1 is coming from the theme’s call to the wp_enqueue_style() function. When the $ver parameter is set to false, the WordPress version is used for the ver query variable. Making changes to your theme’s style.css file will not cause browsers to reload the new version of the file. To do that, you’d … Read more