Widget Logic based on Location

This topic contains 1 reply, has 2 voices, and was last updated by  Alex Rollin 5 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #518775

    Matt Steel
    Expired Member
    Post count: 3

    Hi GD support team,

    I’m looking to show adverts based on region (UK county). So far following the instructions in links below I’ve managed to get ads to show based on category but I don’t quite get the logic for location.
    https://wpgeodirectory.com/docs-v2/faq/common-examples/#logic
    https://wpgeodirectory.com/docs-v2/addons/location-manager/#data

    Please can you give me a more specific example to get started…

    1) I wanted to show something using widget logic when a user visits a listing page with address in region of ‘Suffolk’ what would the code be?

    2) Do I need different widget logic code for search results, location page and listings detail page?

    I would really appreciate your help

    #518785

    Alex Rollin
    Moderator
    Post count: 27815

    For any page,

    
    
    
    geodir_location_get_current( 'region' ) == 'Suffolk'
    
Viewing 2 posts - 1 through 2 (of 2 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