New answers tagged

0

Here we use WordPress’ wp_get_theme() to get the theme version (as specified in the theme’s stylesheet, style.css): // get theme version function rave_get_version() { $theme_data = wp_get_theme(); return $theme_data->Version; } $theme_version = rave_get_version(); global $theme_version; wp_enqueue_style( 'main-style', get_template_directory_uri() ...


1

I did answer previously in a same question - Please select a file error . Not sure, if it will help.


0

I happens to me all the time css not updating! if not css error! normally is the browser. Maybe cleaning the browser cache?! in most browsers ctrl + shift + del.


1

I have solution to add class to anchor tag. 1: Step: add this in functions.php function add_additional_class_on_a($classes, $item, $args) { if (isset($args->add_a_class)) { $classes['class'] = $args->add_a_class; } return $classes; } add_filter('nav_menu_link_attributes', 'add_additional_class_on_a', 1, 3); 2: Then use it like ...


0

Thanks to @Tunji's answer, I accomplished this with a more generic function: /** * Use output buffering to convert a function that echoes * to a return string instead */ function echo_to_string( $function ) { ob_start(); call_user_func( $function ); $html = ob_get_contents(); ob_end_clean(); return $html; } Then it can be ...


0

For anyone looking to change the theme name (which as per Jacob's answer is the directory name) and have Wordpress not know what you've done you can manually change settings as described here: https://docs.appthemes.com/tutorials/how-to-change-wordpress-themes-directly-from-the-database/ For me the 'template' option also needed to be the directory name, it ...


1

It's the directory name. If your theme is in wp-content/themes/my-theme, then the theme name is my-theme.


-1

define this line in wp-config.php define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/'); define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME); /* That's all, stop editing! Happy bloggin.! */


Top 50 recent answers are included