how do I include wp_enqueue_style correctly?

you are trying to enqueue stylesheets before wp_enqueue_scripts hook is fired. WordPress recommends registering and enqueuing scripts and styles on the wp_enqueue_scripts hook to ensure they are loaded correctly. In your functions.php, you are enqueueing the stylesheet preload-style using the wp_enqueue_style function outside the wp_enqueue_scripts action hook, causing the error. To resolve this, you need … Read more

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

techhipbettruvabetnorabahisbahis forumuedueduseduedusedueduseduseduseduedu