loybuckz
Member
Posted 1 year ago #
I've been trying to create a conditional loading of stylesheet on a theme that I am trying to make. here is the code that i'm using:
<?php if ( is_page() ); ?>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?> /style2.css" />
<?php else : ?>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url') ?>" />
<?php endif; ?>
i hope someone can help me. thanks in advance
where is the problem?
maybe the use of 'stylesheet_url' in your first line?
try to use 'stylesheet_directory' instead.
http://codex.wordpress.org/Function_Reference/bloginfo
edit:
well spotted, Rev. - totally overlooked this ;-)
does this matter? (I'm no expert in php....)
you have:
<?php if ( is_page() ); ?>
in my themes, I have
<?php if ( is_page() ) : ?>
loybuckz
Member
Posted 1 year ago #
wohooo!!!
thanks Rev. Voodoo!!! now its working!
Thank you very much and God Bless!