Echo location city in php?

This topic contains 6 replies, has 3 voices, and was last updated by  Stiofan O’Connor 8 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #355472

    Scott Harris
    Lifetime Member
    Post count: 74

    I am adding content to GD Listing pages for each category and location. I’d like to dynamically add titles to the top of each listing page so that it says “Places in City”

    I’m half way to my answer. I downloaded the PHP Code Widget plugin that lets you add code to a text widget. Then I added the following php which echos the category description.
    <?php echo category_description( $category_id ); ?>

    However, I’d also like to be able to add the location for each location-based category page. Is there php code that I can use to echo the category+location top description in the widget? I’d prefer to echo the city and state and not the country.

    #355513

    Guust
    Moderator
    Post count: 29970

    By default the title of the page includes the location:
    http://wordpressmu-3822-8567-17899.cloudwaysapps.com/try-geodirectory/places/united-states/pennsylvania/philadelphia/

    You can add the location specific description for the category automatically.

    Let me know if I misunderstood completely … ?

    #355514

    Guust
    Moderator
    Post count: 29970
    This reply has been marked as private.
    #355523

    Scott Harris
    Lifetime Member
    Post count: 74
    This reply has been marked as private.
    #355832

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This feature will be in the next release, i suggest you wait.

    Thanks,

    Stiofan

    #360531

    Scott Harris
    Lifetime Member
    Post count: 74

    Hi Stiofan –

    I upgraded to 1.6.17 today and saw this in the release notes 1.6.16: “New title variables added to display country/region/city/neighbourhood”. Is that the feature I was asking about?

    #361170

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Yes but not that change, if everything is upto date, go in to and edit a category from the backend and you will be able to add description for each location.

    Thanks,

    Stiofan

Viewing 7 posts - 1 through 7 (of 7 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