Can’t get custom CSS file to load in Child theme

A few points: First: You are using is_page_template() on the “‘page-sgt_peppers.php” enqueue then you use is_page() for “page-mp3-downloader.php”. You should use is_page_template() for both. Second: You are using wp_register_style() incorrectly. From the codex: A safe way to register a CSS style file for later use with wp_enqueue_style(). Note the “later use” part. The register script … Read more

Enqueue style for specific site type

is_tax() and is_404() perhaps? https://codex.wordpress.org/Conditional_Tags UPDATE: I’m sorry my original answer was vague, to elaborate better: You can add conditional tags in a wp_enqueue_scripts hook, choosing to register and enqueue when criteria is met, like so: add_action( ‘wp_enqueue_scripts’, ‘mythemes_scripts’ ); function mythemes_scripts() { if (is_category()) { wp_register_style( ‘categoryStyles’, get_template_directory_uri() . ‘/style-category.css’, array(), // maybe the … Read more

Enqueueing styles with version variable

Try this // global theme version $version = ‘1.0.0’; function frontend_styles() { global $version; wp_enqueue_style( ‘frontend_styles’, //reference get_stylesheet_directory_uri() . ‘/assets/css/app.min.css’, //source array(), //dependenices $version, //version number ‘all’ //media type (‘all’, ‘screen’, ‘handheld’, ‘print’) ); }

Google Fonts not loading correctly

It looks like the URL is getting parsed somewhere and whatever does the parsing is probably internally only able to deal with one parameter for a particular name, so just keeps the second value for the family parameter. As you have a valid usecase for having two parameters with the same name, you might want … Read more

Why is my wp_enqueue_style() not working?

Looking at your debugging output it seems like you might be developing a child theme? If so then the function get_stylesheet_directory_uri() is needed instead of get_template_directory_uri() because the latter will always use the Parent theme, whereas the former will use the Child if its present. So try this instead: function load_stylesheets(){ wp_enqueue_style(‘bootstrap’, get_stylesheet_directory_uri().’/assets/css/bootstrap.css’, array(), false, … Read more

Custom WordPress Theme loads js but not stylesheets

Theres no such hook as wp_enqueue_style. Stylesheets need to be enqueued on the wp_enqueue_scripts hook, as seen in the documentation. So this: add_action( ‘wp_enqueue_style’, ‘test_enqueue_styles’); Needs to be: add_action( ‘wp_enqueue_scripts’, ‘test_enqueue_styles’); I’d also suggest reviewing the documentation on hooks, to understand what add_action() does.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)