-
Notifications
You must be signed in to change notification settings - Fork 20
Description
hello to everybody
first of all thank you for this awesome project.
i just want to tell you there is a thing. if you want use it to your custom theme the styles and scripts will not load.
`/**
* Enqueue scripts and styles
*/
public function setup_admin_scripts() {
wp_register_script( 'cmb-tabs', plugins_url( 'js/tabs.js', FILE ), array( 'jquery' ), self::VERSION, true );
wp_enqueue_script( 'cmb-tabs' );
wp_enqueue_style( 'cmb-tabs', plugins_url( 'css/tabs.css', __FILE__ ), array(), self::VERSION );
wp_enqueue_style( 'cmb-tabs' );
}
/**
* Enqueue dark mode styles
*/
public function setup_dark_mode() {
wp_enqueue_style( 'cmb-tabs-dark-mode', plugins_url( 'css/dark-mode.css', __FILE__ ), array(), self::VERSION );
wp_enqueue_style( 'cmb-tabs-dark-mode' );
}`
it will load files from plugins_url() but if you want use it in your theme you have to use this code :
`/**
* Enqueue scripts and styles
*/
public function setup_admin_scripts() {
wp_register_script( 'cmb-tabs', get_template_directory_uri() . '/cmb2-tabs-master/js/tabs.js', array( 'jquery' ), self::VERSION, true );
wp_enqueue_script( 'cmb-tabs' );
wp_enqueue_style( 'cmb-tabs', get_template_directory_uri(). '/cmb2-tabs-master/css/tabs.css', array(), self::VERSION );
wp_enqueue_style( 'cmb-tabs' );
}
/**
* Enqueue dark mode styles
*/
public function setup_dark_mode() {
wp_enqueue_style( 'cmb-tabs-dark-mode', get_template_directory_uri(). '/cmb2-tabs-master/css/dark-mode.css', array(), self::VERSION );
wp_enqueue_style( 'cmb-tabs-dark-mode' );
}`
thanks a lot