• Resolved Djul

    (@djul)


    Hi,
    somebody can help me adding a 3rd stylesheet to my site?
    I’m a beginner in Php and tried to add a conditionnal tag to my header?php, expecting it to load a special css file if a special page is called.

    The problem is that I can’t get it working. I assume I’m making
    it in a wrong way, but I don’t know where is the mistake?

    Here is my code:

    <?php if ( is_page(array('About', 'Contact', 'Showreel')) ) { ?>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/styleLarge.css" type="text/css" media="screen" />
    <?php elseif ( is_page('Blog') ):?>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/styleblog.css" type="text/css" media="screen" />
    <?php } else { ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <?php } ?>

    This is the blog page which is causing me problem. thanks

Viewing 1 replies (of 1 total)
  • Thread Starter Djul

    (@djul)

    Oops, found on my own.
    Just forgot open and close brace for the 2nd stylesheet…
    Well I’m not php fluent actually 😛

Viewing 1 replies (of 1 total)

The topic ‘Adding a third stylesheet to my WP site’ is closed to new replies.