How do I remove Google Fonts from a parent theme?

You may also want to try to deregister the style within your function since it has been register in the parent theme function. Try: function remove_google_fonts_stylesheet() { wp_dequeue_style( ‘pixgraphy_google_fonts’ ); wp_deregister_style(‘pixgraphy_google_fonts’); } add_action( ‘wp_enqueue_scripts’, ‘remove_google_fonts_stylesheet’, 100 );

Stylesheet version not showing in browser when adding version number to stylesheet in enqueue

It appears you’re using the Sage theme framework – presumably you’re also using Soil? One of Soil’s modules explicitly disables asset versioning – ensure that you haven’t enabled in it in your theme by way of add_theme_support( ‘soil-disable-asset-versioning’ ); or add_theme_support( ‘soil’, [ ‘disable-asset-versioning’ ] ); If Soil is not responsible it could be any … Read more

Why is wp_enqueue_style not working?

I figured out the problem. It was working all along. The site I’m working on had installed a plugin called ‘Autoptimize’ which will shove all your CSS into an inline <style> tag. I was trying to search the output HTML for a reference to my CSS file, but it wasn’t there, because this plugin was … Read more

Trying to get styles to register than enque

You need to use the correct hook. Currently, WordPress has a hook for enqueueing scripts: wp_enqueue_scripts, but does not have an analogous hook for enqueueing stylesheets, such as wp_enqueue_styles. So, for the time-being, hook your stylesheet-enqueueing callback into wp_enqueue_scripts.

Stooping a css file from loading in the header

Extract the ninja form plugin’s files to a folder, and use a text editor such as Notepad++ to search within the files of the plugin and find either one of these phrases: `wp_enqueue_style` OR `css_ninja_form` You will end up with at least 1 result, which will be similar to : add_action( ‘wp_enqueue_scripts’, ‘css_ninja_form’, xyz ); … Read more

Custom admin bar css on front end bug

You make it the wrong way. First, you do double work. Enqueue inside enqueue. You don’t need wp_enqueue_scripts(): wp_enqueue_style( ‘color-admin-bar’, PATH_TO_CSS, array( ‘admin-bar’ ) ); Second. Don’t use anonymous functions with WordPress Actions. Once-for-all-time is OK, but while the project is growing up you can collide with the inability to dequeue that style when you’ll … Read more

wp_enqueue_style url is trimmed somehow

Based on the ID attribute id=’ai1ec_style-css’ that stylesheet is for All-in-One Event Calendar plugin. If you just updated the All_in-One Event Calendar (the most recent update was yesterday 2013-8-16) try re-saving the calendar theme options in Events->Theme Options. This answer is based on this support topic. http://wordpress.org/support/topic/broken-links-inside-plugin-after-updating-to-196

Unable to load stylesheet via wp_enqueue_style

Yo have not opened the php tag correctly in the beginning of your snippet. try adding at least one space after <?php and right before the first //: <?php // Load the theme stylesheets function theme_styles() { // Load all of the styles that need to appear on all pages wp_enqueue_style( ‘main_css’, get_template_directory_uri() . ‘/style.css’ … Read more

Different styles on multiple pages

You can use elseif to check another page template and you can go on like this. if ( is_page_template(‘page-templates/page-1.php’) ) { wp_enqueue_style( ‘sentiencesentient-layout-style’ , get_template_directory_uri() . ‘/layouts/style1.css’); } elseif ( is_page_template(‘page-templates/page-2.php’) ) { wp_enqueue_style( ‘sentiencesentient-layout-style’ , get_template_directory_uri() . ‘/layouts/style2.css’); } elseif ( is_page_template(‘page-templates/page-3.php’) ) { wp_enqueue_style( ‘sentiencesentient-layout-style’ , get_template_directory_uri() . ‘/layouts/style3.css’); } elseif ( is_page_template(‘page-templates/page-4.php’) … Read more