WordPress.org

Ready to get started?Download WordPress

Forums

Simply Works Core
Alternate Stylesheet for Home Page (4 posts)

  1. Fisherman777
    Member
    Posted 2 years ago #

    Howdy! I'm trying to use an alternate css on my home page. It's not working at all. Here's the code that I added in the header on the line above "<?php wp_head(); ?>":

    <?php
    if(is_front_page()){
       echo '<link href="/skins/redwide.css" rel="stylesheet" type="text/css" />';
    }
    ?>

    Sorry, I'm new to WordPress. It is broken. Can you to make it go? LOL

    Thanks in advance.

    http://wordpress.org/extend/themes/simply-works-core/

  2. Tarsem Singh
    Member
    Posted 2 years ago #

    If you CSS file exist in your main theme please do at this way -

    <?php
    if ( is_home() ) {

    <link href="<?php echo bloginfo('template_url');?>/skins/redwide.css" rel="stylesheet" type="text/css" />

    <?php } ?>

    Hope this code is Working for you.

  3. Fisherman777
    Member
    Posted 2 years ago #

    Thanks for the reply. That didn't work. I'm not sure what to do. I'll figure it out though and let you all know what I came up with.

  4. Fisherman777
    Member
    Posted 1 year ago #

    Well, here's what I came up with. I just made additions to the style sheet and use alternate templates for the home and other pages. Simple!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic