Hide module based on package

This topic contains 5 replies, has 2 voices, and was last updated by  Guust 6 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #429236

    Bradley
    Expired Member
    Post count: 16

    I’d like to show/hide a module based on the users package. Just two options really. I want to show a module on the details page for free listings. Any paid listings would not show this module. Is there a built in feature that does this sort of thing?

    #429243

    Guust
    Moderator
    Post count: 29970

    Can you clarify what you mean with module?
    This may be a solution depending on what you mean: https://wpgeodirectory.com/docs/common-code-snippets/#package

    Thanks

    #429256

    Bradley
    Expired Member
    Post count: 16

    I meant to say “Widget”, not module. This solution looks like it’s close, but I only want to show the contents of the widget if it’s a free listing. It’s basically something I want to use as an incentive for them to upgrade their listing.

    #429272

    Guust
    Moderator
    Post count: 29970

    A free listing will still have a package ID.
    So you hide the widget with CSS for all except the free package.

    Another solution is to create a custom field that only works for free listings, and use these settings:
    * admin only
    * only for free listings
    * show where you want it
    * default text is whatever you want to display on all the free listings.

    #429406

    Bradley
    Expired Member
    Post count: 16

    Thanks!

    #429444

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

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

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

Open Support Ticket