Viewing 8 replies - 16 through 23 (of 23 total)
  • It did not work for me, though at least the options I mentioned above stay checked. I have now blocked ads on pages, sticky front page, home page and front page, but the ad is still there on my home page.

    https://www.lrfoodcast.com

    Thread Starter manojtd

    (@manojtd)

    That’s strange. How do you specify the home page https://www.lrfoodcast.com? I mean, what do you have as “WordPress Address (URL)” and “Site Address (URL)” in https://www.lrfoodcast.com/wp-admin/options-general.php? Is there some other option in your theme config where you specify your home page?

    Looks like the WP functions like is_home(), is_front_page() and is_sticky() are returning false on your home page, which is why I ask.

    Yes, both my WordPress Address and Site Address are set to https://www.lrfoodcast.com. I am using Virute 2.1.0 as my theme. I’m not entirely sure how to modify the functions is_home(), is_front_page() and is_sticky(). Any advice on how to change those?

    Thread Starter manojtd

    (@manojtd)

    We cannot change the WP functions like is_home etc. I will try to take a look at the theme and debug. Thanks.

    Thread Starter manojtd

    (@manojtd)

    BTW, when you visit your home page after logging in as admin, does it give you an option to Edit Page or Post? If so, could you edit the page and add a Custom Field with name = adsense and value = no? This custom field should suppress ad blocks on the page.

    Thread Starter manojtd

    (@manojtd)

    @rhycar,

    Do you have a customized front_page.php in your theme folder? I installed the Virtue theme in my local blog, and it seems to return the correct values for the functions.

    I added the following lines at the beginning of 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 <code>%s</code> is: <code>%b</code><br/>\n", $fn, $fn());
    }
    ?>

    And I get:

    Output of is_page is: 0
    Output of is_sticky is: 0
    Output of is_home is: 1
    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

    May be you could try the test?

    Hi, I am so sorry it’s taken me months to respond to this. I ran the test and did not get the same results you did. Specifically, the home output did not return positively.

    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

    What should I do to make output of is_home become a 1? Thanks again for all your help.

    Thread Starter manojtd

    (@manojtd)

    I’m sorry, I don’t know how to modify is_home() function, and why it would behave differently for you.

    Since is_front_page() is returning 1, may be you could try suppressing ads on the front page?

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Easy Adsense Version 7.00’ is closed to new replies.