Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mikelangel001

    (@mikelangel001)

    Perfect! Thaks! 😀

    Hello DigitalNature this question goes to you.

    I have a blog (patataloca.net) with the theme mystique. I used the following code to put an adsense block below the first post.

    <?php
    function my_ads(){
      global $ads_already_displayed;
      if(is_home())
       if(!$ads_already_displayed){
        $ads_already_displayed = 1;
        echo do_shortcode('[ad code=1]');
       }
    } 
    
    add_action('mystique_after_post', 'my_ads');
    ?>

    So far, so perfect, but I also want to put a adsense block on post number 8 for example. What would you change or add to show me the adsense below the first post (as I had) and also in the eighth?

    Sorry if I’m not well understood, but I am Spanish and my English is not perfect.

    Thank you very much and hope you can help.

    Hello DigitalNature this question goes to you.

    I have a blog (patataloca.net) with the theme mystique. I used the following code to put an adsense block below the first post.

    <?php
    function my_ads(){
      global $ads_already_displayed;
      if(is_home())
       if(!$ads_already_displayed){
        $ads_already_displayed = 1;
        echo do_shortcode('[ad code=1]');
       }
    } 
    
    add_action('mystique_after_post', 'my_ads');
    ?>

    So far, so perfect, but I also want to put a adsense block on post number 8 for example. What would you change or add to show me the adsense below the first post (as I had) and also in the eighth?

    Sorry if I’m not well understood, but I am Spanish and my English is not perfect.

    Thank you very much and hope you can help.

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