Hot answers tagged


What worked for me running Wordpress on a Bitnami stack under Windows was to edit my php.ini file and restart my server. In the [opcache] section change the opcache.revalidate_freq to 1 opcache.revalidate_freq=1 I then restarted my servers and my pages now immediately show changes made to my plugins.


Per Tony's suggestion, adding a random string to the CSS version did the trick. Here's the code I used to do that. First this code to generate the random number. // get theme version function cd_get_version() { $theme_data = wp_get_theme(); return $theme_data->Version; } $theme_version = cd_get_version(); global $theme_version; // get random ...


Please use the body_class filter to add any class to the body tag in WordPress. Add the below code to your functions.php file. Add class to the body tag for all the pages. add_filter('body_class', 'wp_body_class'); function wp_body_class($class) { $class[] = 'my-custom-class'; // Add your class name here. Multiple class names can be added 'classname1 ...


As of WordPress 5.3, <a> elements generated by wp_get_archives (etc) for links to the current page have the attribute aria-current="page" added to them. If you just want to style the current page link differently, you can now target this with CSS, assuming you are happy for the styles to all be on the <a>: a[aria-current="page"...

Only top voted, non community-wiki answers of a minimum length are eligible