• Resolved msuess

    (@msuess)


    Hi.

    I only want to show some additional informations on the start-page (and only there!). My hope was to solve this problem with “is_home()”, but it didn?′t work. The informations are always there if I navigate with >> next and prev >>.

    In other words:

    https://www.domain.tld/ —> Show additional stuff
    https://www.domain.tld/page/2/ —> Don?′t show the stuff

    Thx

    matthias

Viewing 3 replies - 1 through 3 (of 3 total)
  • ifelse

    (@ifelse)

    Make a copy of your themes index.php file (i.e. the one in your wp-content/themes/your-theme folder) and rename it to home.php

    Add your additional information in that file. This page takes priority over the index file on the home page i.e. when you navigate to https://www.domain.tld, it is this page that is used.

    Thread Starter msuess

    (@msuess)

    home.php did not work ?? but a short hack …

    < ?php
    if ($_SERVER[‘QUERY_STRING’] != “”)
    {
    ?>

    stuff for the start-page

    < ? } else{?>

    stuff for the subpages

    < ?php
    }
    ?>

    I was having the same problem. is_home() really should only return true if it’s the ‘home page’!
    Thanks for the fix!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘is_home() alternative’ is closed to new replies.