Custom Theme Load
-
Hello Julien, there is an error in the call function Theme Style. If I view the source code I view in href that:
<link rel="stylesheet" id="wpas-theme-styles-css" href="http://localhost/wpress3C:xampphtdocswpress3wp-contentpluginsawesome-support/themes/default_old/css/style.css?ver=3.1.6" type="text/css" media="all">For the moment I rewrite the class-awesome-support.php , on the enqueue_styles() function in the second IF condition.
Changing the code: wpas_get_theme_stylesheet_uri()
by: WPAS_URL . “themes/$theme/css/style.css” with the $theme variable.Final Code:
public function enqueue_styles() { wp_register_style( 'wpas-plugin-styles', WPAS_URL . 'assets/public/css/public.css', array(), WPAS_VERSION ); if ( ! is_admin() && wpas_is_plugin_page() ) { wp_enqueue_style( 'wpas-plugin-styles' ); $stylesheet = wpas_get_theme_stylesheet(); $theme = wpas_get_theme(); if ( file_exists( $stylesheet ) && true === boolval( wpas_get_option( 'theme_stylesheet' ) ) ) { wp_register_style( 'wpas-theme-styles', WPAS_URL . "themes/$theme/css/style.css", array(), WPAS_VERSION ); wp_enqueue_style( 'wpas-theme-styles' ); } } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom Theme Load’ is closed to new replies.