WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WordPress is_home() conditional tag not working (5 posts)

  1. sutharphp
    Member
    Posted 1 year ago #

    <?php
    if ( is_home() ) {
    // This is a homepage
    } else {
    // This is not a homepage
    }
    ?>

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    where is that code located?

    is your template using custom queries?

    are you using plugins?

    what theme are you using?

  3. sutharphp
    Member
    Posted 1 year ago #

    m useing theme :-responsive
    url:- http://wordpress.org/extend/themes/responsive

    not using plugins

  4. sutharphp
    Member
    Posted 1 year ago #

    this code <?php
    if ( is_home() ) {
    // This is a homepage
    } else {
    // This is not a homepage
    }
    ?>

    using in header.php

  5. alchymyth
    Forum Moderator
    Posted 1 year ago #

    are you testing for the 'posts page' or the 'front page'?

    check the difference between is_home() and is_front_page()

    http://codex.wordpress.org/Conditional_Tags

Topic Closed

This topic has been closed to new replies.

About this Topic