How to NOT override inline css rules

Please see this post about including styles and scripts correctly. As far as I can see, you are just throwing in the style.css, giving WordPress not the opportunity to decide, which stylesheet comes when. In order to do that, you need to register your style first, then WordPress can decide according to your priority, where … Read more

PHP Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered

Before you can use, those two lines : wp_enqueue_style( ‘wp-auth-check’ ); wp_enqueue_script( ‘wp-auth-check’ ); you should register those assets, inside wp_enqueue_scripts or admin_enqueue_scripts, like the following : function my_assets() { wp_register_style( ‘wp-auth-check’, ‘path/to/style’, $deps = array, $ver = false, $media=”all” ) wp_register_script( ‘wp-auth-check’, ‘path/to/your-script’, $deps = array, $ver = false, $in_footer = false ) } … Read more

Bootstrap 4 Optimization

You just make a big mistake. use this guideline. header.php <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css” integrity=”sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm” crossorigin=”anonymous”> You also made a mistake calling js file. Frist needs jQuery then popper.js then bootstrap and the big mistake is you call all of them in the header file, that’s why when the page is loaded it takes time to … Read more

Browser stacks different versions of style.css

The problem comes from that the parent style is loaded twice : one with version (‘?ver=1.0 etc, first on your picture and loaded by your parent theme with versionning on wp_enqueue_style ), another without (the second on your picture, called by your function php). To solve this : remove wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ ); … Read more

How can I print out a single stylesheet or javascript link?

to print a single style: wp_print_styles(‘admin-bar’); to print a single script: wp_print_scripts(‘admin-bar’); note that the handle must be registered first using wp_register_style() or wp_register_script(). http://codex.wordpress.org/Function_Reference/wp_register_script http://codex.wordpress.org/Function_Reference/wp_register_style

Background of default template showing instead of the background of custom page template

As I suspected, the issue is where/how you’re outputting your custom stylesheet. First, move this to functions.php: function mypage_head() { echo ‘<link rel=”stylesheet” type=”text/css” href=”‘.get_bloginfo(‘template_directory’).’/OldSkool-src/style.css”>’.”\n”; } add_action(‘wp_head’, ‘mypage_head’); Second, change the action into which you’re hooking your callback. You’re using wp_head. All other stylesheets will be using wp_print_styles. The wp_print_styles action fires inside of the … Read more

wp_enqueue_scripts hangs

I’m not sure you can use is_page() in the function.php (citation needed!). Instead of enqueuing the the style sheets, you could echo them in the header.php. So, in the header.php you’d want… <?php if ( is_front_page() ) { echo ‘<link rel=”stylesheet” type=”text/css” href=”‘ . get_template_directory_uri() . ‘/css/homepage.css”>’; } else if ( is_page( ‘corsi’ ) ) … Read more

wp_enqueue doesn’t load dependencies

You have to define the dependencies for either styles or scripts when you register them. Or, if you’re avoiding the registration completely, then it’s ok to stuff them into the queueing process. See more on the Codex page. wp_register_style( ‘reset’, get_template_directory_uri().’/reset.css’ ); wp_register_style( ‘style’, get_template_directory_uri().’/style.css’, array( ‘reset’ ) ); wp_enqueue_style( ‘style’ ); Also avoid single … Read more