Adsense in free posts

This topic contains 4 replies, has 2 voices, and was last updated by  Paolo 7 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #390265

    Krzysztof Laska
    Expired Member
    Post count: 11

    Hi, it’s my first time here, be nice 😉

    I want to display adsense ads on the pages with free listing details, but not on the paid ones. I have searched the FAQ and forums, without results. Installed CPT, but couldn’t find anything relevant there. Is it possible to do it? If so, how?

    #390283

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you could use a text/html widget with the widget logic plugin https://wordpress.org/plugins/widget-logic/

    a similar snippet for the logic:

    $post->package_id == 1

    Would make the ads appear only on listings assigned to the price package with ID=1

    Let us know how it goes,

    Thanks

    #390307

    Krzysztof Laska
    Expired Member
    Post count: 11

    Thanks, I’ll try it later today.

    #390316

    Krzysztof Laska
    Expired Member
    Post count: 11
    global $post; return ($post->package_id ==" 1");

    seems to be working. Thanks.

    #390317

    Paolo
    Site Admin
    Post count: 31206

    Thanks for letting us know 🙂

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount