Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112466

kreegah on "taxonomy and term function"

$
0
0

Yeah, I've removed my variable.

but unfortunately my code won't work :(

function change_stylesheet_uri( $stylesheet_uri, $stylesheet_dir_uri ) {

    if (term_exists( 'grunnmur' ))
    	return $stylesheet_dir_uri .'/grunn.css'; 

    elseif (term_exists( 'gulv' ))
    	return $stylesheet_dir_uri .'/gulv.css'; 

 	else
 		return $stylesheet_dir_uri . '/style.css'; // our default stylesheet

}

The really weird part is that my url shows

/?taxonomy=product_categories&term=gulv

and still the css for term_exists( 'grunnmur' ) loads in the whole page. not just for the product category "Grunnmur" as it should.


Viewing all articles
Browse latest Browse all 112466

Trending Articles