Business site disabling ads on page not working

Forums Forums SwiftThemes Support Business site disabling ads on page not working

This topic contains 14 replies, has 2 voices, and was last updated by  Mahendra Rana 4 years, 7 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #31559

    Mahendra Rana
    Spectator

    <div class=”site-info”>Site url: http://tallynine.com/tally-partners/<br>Version:7.2.6</div>Hello,

    I am running a blog and now I want to create a business site home page on the same blog.
    I want to run 728*90 header ad and 428*60 Google link ad on entire blog

    But again I want to disable these ads on the home page(business page which is currently on draft mode.

    I checked the disable ad options on that page under Swift CMS still it is showing the Ads on that page. The page is under Draft mode and I am using fronted Builder page plugin. This problem is there even when I use Site Origin page plugin
    Any Solution to this problem?

    #31560

    Satish Gandham
    Keymaster

    Will look into it and get back to you tomorrow.

    #31562

    Mahendra Rana
    Spectator

    Thanks a lot. I respect your time and efforts. If you need the login details, then please let me know so that I can keep them ready in advance advance and will submit it through your support page as mentioned here in the right side pane.

    • This reply was modified 5 years, 3 months ago by  Mahendra Rana.
    #31564

    Satish Gandham
    Keymaster

    Please do. Thank you.

    Satish Gandham

    #31567

    Mahendra Rana
    Spectator

    I sent all details yesterday night. Hope you have received it.

    #31575

    Satish Gandham
    Keymaster

    Hi Mahendra,
    Sorry for the delay in getting back. It is a bug, will release the fix in couple of days.

    If you can fix the current version by changing line 520 in swift/functions.php yo

      if(is_single() || is_page()){
    
    #31576

    Mahendra Rana
    Spectator

    Thanks I will test it in coming Days.

    #31582

    Mahendra Rana
    Spectator

    Yes, That works. Thanks a lot.
    I have to admit that Swift themes gives me double Organic PV and Ads-ense earnings

    #34389

    Mahendra Rana
    Spectator

    Hello Satish,

    Once Again, I need help

    The above code works fine on home page
    However I have installed Woo commerce and so, I wanted to disable ads on shop/products etc page

    I tried it in the below code by adding woocommerce page but its not working.

    I tried by changing page template to woocommerce, full hybrid etc.

    I also disabled the global settings in the shop /product page for advertisement
    still it is showing ad. The ads are showing “header ad” and adsense linked unit ad below the navigation pane

    I think something I missing in the below code
    can you help me Thanks a lot

    add_action(‘wp_head’,’swift_hide_ads’);
    function swift_hide_ads(){
    GLOBAL $swift_hide_all_ads;
    if(is_single() && (is_woocommerce()|| is_page())){
    GLOBAL $post;
    $swift_hide_all_ads = get_post_meta($post->ID,’_swift_post_meta’,true);
    if(isset($swift_hide_all_ads[‘disable_all_ads’]))
    $swift_hide_all_ads = $swift_hide_all_ads[‘disable_all_ads’];
    else
    $swift_hide_all_ads = false;
    }else{
    $swift_hide_all_ads = false;
    }

    #34408

    Mahendra Rana
    Spectator

    Hello Satish,

    I have reopened this query. you might have missed it so, I marked it as unresolved.

    Please help me to sort out this issue.

    Thanks

    #34415

    Satish Gandham
    Keymaster

    It should be

     if(is_single() || is_page() || is_woocommerce()){
    

    Goto woocommerce page and disable ads on each page.

    #34417

    Mahendra Rana
    Spectator

    Thanks you its resolved.

    #34418

    Mahendra Rana
    Spectator

    Sorry,

    On products page it works and ads are removed but

    At shop page it is still showing ad

    I have disabled Swift CMS Ad sections in shop page

    still it is showing ads

    #34420

    Satish Gandham
    Keymaster

    add is_shop() to the if checks.

    #34422

    Mahendra Rana
    Spectator

    I done this way but its not working still showing ads at shop page

    function swift_hide_ads(){
    GLOBAL $swift_hide_all_ads;
    if(is_single() || is_page() || is_woocommerce() || is_shop()) {
    GLOBAL $post;
    $swift_hide_all_ads = get_post_meta($post->ID,’_swift_post_meta’,true);
    if(isset($swift_hide_all_ads[‘disable_all_ads’]))
    $swift_hide_all_ads = $swift_hide_all_ads[‘disable_all_ads’];
    else
    $swift_hide_all_ads = false;
    }else{
    $swift_hide_all_ads = false;
    }

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.