WordPress.org

Ready to get started?Download WordPress

Forums

is_home() not working (2 posts)

  1. Pospiech
    Member
    Posted 6 years ago #

    I want to test for the home page (root)
    I tried with is_home(), is_page('39') and is_page('Startseite'), but nothing worked

    How then?

    Here my code in page.php

    <?php if(is_single('39') ) { ?>
    <div id="contentwide">
    <h1>contentwide</h1>
    <?php } else { ?>
    <div id="content">
    <?php } ?>

    Matthias

  2. Pospiech
    Member
    Posted 6 years ago #

    it has to be is_page('39'). the is_single is meantioned in the documentation as the according solution.

    Matthias

Topic Closed

This topic has been closed to new replies.

About this Topic