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

add a CSS id to the body of a page in wordpress

Put this in your functions.php → <?php function body_id_dynamic() { if (is_home()) { echo ‘ id=”home”‘; } elseif (is_single()) { echo ‘ id=”single”‘; } elseif (is_search()) { echo ‘ id=”search”‘; } elseif (is_archive()) { echo ‘ id=”archive”‘; } } ?> and then this → <body<?php body_id_dynamic(); body_class(); ?>> P.S. → More customization is possible. This … Read more

CSS in child theme not getting loaded

Parent vs Child Themes get_template_directory_uri always refers to the parent theme you can verify this as you always should when things don’t load as expected by looking in the console in the browsers dev tools. These would show 404 errors for the CSS files, in the wrong folder. Instead, use get_stylesheet_directory_uri, the stylesheet family of … Read more

How do I add a class to that is generated by >

You can add to the function simply by placing the desired class as the first parameter like so body_class(‘class-name’). If you’d like a little more flexibility you can hook into it using add_filter(‘body_class’,’my_class_names’). You can read more here.

Change CSS when user is logged in

Here is another CSS-only approach, without any inline-PHP and needless CSS-spam in the head. If your theme is correctly using body_class() and a user is logged in, WordPress adds a class “logged-in” to the body-element, so we can use this in our stylesheet: <–logged out–> .sellertitle { float: none; width: 49%; } .otherseller { display: … Read more

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