Quantcast
Viewing all articles
Browse latest Browse all 95994

pdxDaniela on "page doesn't recongize one of the subtemplates css"

Hello, this is what I have in my functions.php

//load subtemplate aboutus
function aboutus_style() {
	if( is_page_template('aboutusSub.php') ) :
	wp_register_style('my-style', get_stylesheet_directory_uri() . '/css/aboutus.css', array(), '', 'all' );
	wp_enqueue_style( 'my-style' );
	endif;
}
add_action('wp_enqueue_scripts', 'aboutus_style');

that code above is recognized and the subtemplate picks up the css.
the code below. should work. but the page, w/the correct subtemplated added and selected as well in the admin create pages panel doesn't.

//load subtemplate level3and4
function l3_style() {
	if( is_page_template('l3sub.php') ) :
	wp_register_style('my-style', get_stylesheet_directory_uri() . '/css/l3.css', array(), '', 'all' );
	wp_enqueue_style( 'my-style' );
	endif;
}
add_action('wp_enqueue_scripts', 'l3_style');

so for example the page http://thebigmeow.us/invest/reports/
is not picking up the styling assigned.
How can I fix this please?
thank you.
d


Viewing all articles
Browse latest Browse all 95994

Trending Articles