List of search results of one city on different pages

This topic contains 7 replies, has 2 voices, and was last updated by  Andreas Nunn 5 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #539237

    Andreas Nunn
    Free User
    Post count: 10

    I have a question about the following situation:
    At the bottom of my website http://www.gentle-session.de I have a city list. Each city has its own page. Each page is structured the same way. First there is a small text and then a list of different locations. I would like to replace this static location list with the output of the registered locations.

    For example, for the city “Aachen” I should be able to include the following output in the existing page from “Aachen” but without a search bar. Only the output of the entries:
    https://www.gentle-session.de/suche/?geodir_search=1&stype=gd_place&s=+&snear=Aachen&sgeo_lat=50.7753455&sgeo_lon=6.083886800000001

    Is it possible to include the output of all registered locations of the respective city via shortcode? Do I need an additional plugin for this?

    #539272

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    You will need the location manager addon. You can probably do a very clever design if you are focused on that single listing, with various techniques for replacing text available with GeoDirectory.

    https://wpgeodirectory.com/docs-v2/addons/location-manager/

    #539326

    Andreas Nunn
    Free User
    Post count: 10

    Thank you for your answer. I am already using this plugin. However, I do not know how to display all entries of city A on the “City A” page and all entries of City B on the “City B” page.

    #539391

    Alex Rollin
    Moderator
    Post count: 27815

    GD will automatically create pages for each city.

    Add the “Change Location” menu item to switch between cities.

    https://wpgeodirectory.com/docs-v2/geodirectory/navigation/

    To change what appears on the page, to show all listings, use the GD Listings shortcode on the page. Add one for each custom post type you are using.

    https://wpgeodirectory.com/docs-v2/templates/location/

    Use the shortcode builder or blocks to add the GD Listings Element

    https://wpgeodirectory.com/docs-v2/geodirectory/shortcode-builder/
    https://wpgeodirectory.com/docs-v2/design/gd-listings/

    #539453

    Andreas Nunn
    Free User
    Post count: 10

    If I understand you correctly, the plugin creates separate pages for each city and I can edit them. But how can I insert the output of the entries on existing pages?

    In my case, for example, I have the following subpage:
    https://www.gentle-session.de/coverband-eventband-partyband-deutschland/event-coverband-in-berlin-buchen/

    Here I would like to output the entries for the city “Berlin” below the red button.
    I don’t want the plugin to generate a new page. I want to integrate the output into the existing page.

    #539607

    Alex Rollin
    Moderator
    Post count: 27815

    You can use GD Listings and GD Map to output all the listings in a certain location.

    here is the example for GD Map

    https://wpgeodirectory.com/docs-v2/design/maps/#location

    #539629

    Andreas Nunn
    Free User
    Post count: 10

    Okay, I feel we’re close to the goal. 🙂
    Showing a map works. The map is displayed with all entries. I use the following shortcut:

    [gd_map width=”100%” height=”425px” maptype=”ROADMAP” zoom=”0″ map_type=”auto” post_settings=”1″ cat_filter=”1″ marker_cluster=”1″]

    Now I only want to display the entries of a certain city. So the shortcut should be:

    [gd_map width=”100%” height=”425px” maptype=”ROADMAP” zoom=”0″ map_type=”directory” post_settings=”1″ cat_filter=”1″ marker_cluster=”1″ country=”germany” region=”nordrhein-westfalen” city=”aachen”]

    Now no entries are displayed. It doesn’t matter what value I have with map_type.

    See here:
    https://www.gentle-session.de/coverband-eventband-partyband-deutschland/event-coverband-in-aachen-gesucht/

    #539743

    Andreas Nunn
    Free User
    Post count: 10

    I was able to solve the problem myself. The problem was the translation of the country. The correct code must be called:

    [gd_map width=”100%” height=”400px” maptype=”ROADMAP” zoom=”0″ map_type=”directory” post_settings=”1″ cat_filter=”1″ marker_cluster=”1″ country=”deutschland” region=”nordrhein-westfalen” city=”aachen”]

    Fun fact:
    If I use gd_listings both work (“german” and “deutschland”). 🙂

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