WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page specific CSS (3 posts)

  1. skeeterz71
    Member
    Posted 4 months ago #

    Hi,

    I am not sure what I am doing wrong. When I wrap my style sheet in the if statement, my style sheet ceases to work. If I remove the if statement, works just fine.

    <?php if (is_page_template('home.php')){ ?>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/homepage.css">
    <?php } ?>
  2. blogjunkie
    Member
    Posted 4 months ago #

    Hi, if you want to print your stylesheet only on the homepage you can use is_home() instead

    http://codex.wordpress.org/Function_Reference/is_home

  3. skeeterz71
    Member
    Posted 4 months ago #

    Thanks. works perfect

Reply

You must log in to post.

About this Topic

Tags

No tags yet.