I am using a page named Blog to show post. The template is the default. The side bar has tabs and they only show on the Blog page.
I am trying to get the stylesheet and javascript to only load on this page.
I have in the functions file
add_action('wp_print_scripts', 'enqueueMyScripts');
function enqueueMyScripts(){
if( is_page('Blog') ) {
wp_enqueue_script( 'tabber', get_bloginfo('template_url').'/js/tabber-minimized.js', false, '1.0', true);
}
}
add_action('wp_print_styles', 'enqueueMyStyles');
function enqueueMyStyles(){
if( is_page('Blog') ) {
wp_enqueue_style( 'tabs', get_bloginfo('template_url') . '/css/tabs.css');
}
}
Neither file will load.
I am using a page named Frontpage as my static frontpage. When I change is_page to Frontpage, both the scripts load.
Anyone know a reason why they wouldn’t load on the Blog page?
Using wp 3.3.1