• Resolved Petar

    (@h3o)


    Hello everybody,

    I have a problem with IF statement

    I want to display some content only on home page and I’ve tried

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I get <p>NOT homepage content</p> on homepage

    I am going crazy with this

Viewing 3 replies - 1 through 3 (of 3 total)
  • What do you have under reading settings for ‘Your latest posts’ etc?

    Also, what theme template file are you adding the is_home() code to?

    also, what else is in the template before the if-statement?
    any custom queries?
    custom queries without proper restoring of the original query are quite often the cause for conditional tags ‘not working’.

    link to your site?

    Thread Starter Petar

    (@h3o)

    Custom query was a problem…

    <?php wp_reset_query(); ?> after loop end everything is ok.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘If is_home don't work’ is closed to new replies.