WordPress.org

Ready to get started?Download WordPress

Forums

Conditional Tags Aren't Working (3 posts)

  1. drewmisterh
    Member
    Posted 4 years ago #

    Using WP 2.9.2

    Conditional Tags don't seem to be working in a template I am creating.

    This is the code in the head section:
    <!--[if IE]><link rel="stylesheet" type="text/css" href="styleIE.css" /><![endif]-->

    When I view source from IE8 I see:
    <!--[if IE]><link rel="stylesheet" type="text/css" href="styleIE.css" /><![endif]-->

    Shouldn't the conditional tags be gone?

    What am I doing wrong? Do you have to do something else for this to work in WordPress?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Shouldn't the conditional tags be gone?

    No. What makes you think they will disappear?

    They're also not going to work. You need to use:

    <!--[if IE]><link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/styleIE.css" /><![endif]-->

  3. drewmisterh
    Member
    Posted 4 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic