This topic has 3 replies, 2 voices, and was last updated 10 years by Catalin.

  • Author
  • #21811
     Nick34000
    Participant

    Hello!

    Okay I’m maybe stupid but how I add this code to a php template page or inside the profil-header ? And inside a widdget ?

    COPY CODE
    if(pmpro_displayAds())
    {
    //insert ad code here
    }

    I try that but won’t work :

    COPY CODE
    <php? if(pmpro_displayAds())
    {
    //insert ad code here
    } ?>
    	
    #21984
     Catalin
    Moderator

    Hello,

    If you want to add the code in a php template, you should use something like this:

    COPY CODE
    
    if(pmpro_displayAds())
    {
    //insert ad code here
    }
    

    You need to add the code inside <?php … ?>. In your example, you close the php twice

    COPY CODE
    ?>

    and this won’t work.

    Let me know if this works,

    Thank you,
    Catalin

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #22016
     Nick34000
    Participant

    Hi! I try this `<?php if(pmpro_displayAds())
    {<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
    <!– O*Guyz – Utilisateurs page – –>
    <ins class=”adsbygoogle”
    style=”display:inline-block;width:970px;height:90px”
    data-ad-client=”ca-pub-9907193244060827″
    data-ad-slot=”4391580016″></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    }
    ?>` but my page went blank! T.T It’s doesn’t work (Did I done some thing wrong ?)

    #22023
     Catalin
    Moderator

    Hello,

    I already gave you clear instructions but you need some developer skills to be able to achieve what you want.

    Thank you,
    Catalin

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?