Forums

[resolved] Adding a third stylesheet to my WP site (2 posts)

  1. Djul
    Member
    Posted 1 year ago #

    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

  2. Djul
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic