• I have an IF statement stating, that if it is the homepage, show this stylesheet. This is my code, but it is not working:

    <?php if(is_home() || is_front_page()) echo '<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>styles-home-slider.css" />'; ?>

    but it is not working. I cant figure out how to get the <?php bloginfo('template_directory'); ?> to display correctly.

    Any suggestion on how I can do this?

    Thanks,

    JC

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how-to get bloginfo working in an IF Statement’ is closed to new replies.