• I am having problems with my home page not showing up as “home” for some of my plug-ins. Specifically, Easy AdSense does not recognize it as home and has posted an ad that I don’t want there (you can see why at https://www.lrfoodcast.com – the text gets pushed to the side). The Easy AdSense admin had me run the following test on front_page.php:

    <?php
    $kills = array(‘page’, ‘sticky’, ‘home’, ‘front_page’, ‘category’,
    ‘tag’, ‘archive’, ‘search’, ‘single’, ‘attachment’);
    foreach ($kills as $k) {
    $fn = “is_$k”;
    printf(“Output of %s is: %b
    \n”, $fn, $fn());
    }
    ?>

    The test returned the following:

    Output of is_page is: 1
    Output of is_sticky is: 0
    Output of is_home is: 0
    Output of is_front_page is: 1
    Output of is_category is: 0
    Output of is_tag is: 0
    Output of is_archive is: 0
    Output of is_search is: 0
    Output of is_single is: 0
    Output of is_attachment is: 0

    As you can see, the home output isn’t registering. How do I get this page to register as home for my third party plug-ins?

Viewing 1 replies (of 1 total)
  • is_home in wordpress refers to which page is selected to be your “latest posts” page or blog page in the wordpress settings > reading. So if you want to target your “home” and by that I mean front page use the “is_front_page”.

    Else make your front page the “latest posts” page and that will make it the “is_home”.

    The terms are left over from when wordpress was only a blog format and not a full CMS.

    Kadence Themes

Viewing 1 replies (of 1 total)
  • The topic ‘Homepage not listen as "home" in the code’ is closed to new replies.