Answers to common GeoDirectory questions about search. Click a question to open the answer.
Edit the GD > Search block, widget or shortcode and tick Hide Near Search Input in its Content settings. As a shortcode it looks like this: [<span></span>gd_search hide_near_input='true']. You can hide the keyword box the same way with Hide Main Search Input.
With the Near field hidden, searches are not limited by distance, which suits a directory that covers a single neighbourhood. When someone does search near a place, the radius is set by Search near radius in GeoDirectory > Settings > General > Search, and Search distances there switches between miles and kilometers.
That message comes from GeoDirectory blocks such as GD > Post Meta when they are shown outside a listing, so they have no listing to read from. On search results this usually means the GeoDirectory search page is missing, for example because it was moved to the trash, and the results are being shown with the wrong template.
- Check the trash under Pages and restore the search page if it’s there.
- Go to GeoDirectory > Settings > General > Pages and make sure Search Page points to that page.
- If the page is gone for good, go to GeoDirectory > Status > Tools and run Create default GeoDirectory pages. It only adds pages that are missing.
If you see the message on a normal page, a listing block has been added somewhere outside the GeoDirectory templates. Remove it, or set its Post ID option to a listing.
Search results always go to the page set as the Search Page in GeoDirectory > Settings > General > Pages. Results can’t appear on a different page without custom code.
That search page is a normal WordPress page, so you can make it look the same as the rest of your directory. Edit it and add your own text, images or blocks above and below the results. Keep the GD > Loop block on it, as that is what outputs the results.
To change the heading shown on the results page, go to GeoDirectory > Settings > General > Titles & Meta and edit the Title under Search page.
There is no setting that forces every search to “Near: My Location”. What GeoDirectory does do:
- When a visitor shares their location, for example with the GD > Near Me Button block from Location Manager or the My Location option in the near field, the search form carries that location with it.
- When results have a location to measure from and no other sort is chosen, they are sorted by distance, nearest first.
- You can hide the near field with the Hide Near Search Input option of the GD > Search block.
Making “near me” the default for visitors who have not shared their location would need custom JavaScript, because the browser has to ask the visitor for permission first.
The two pages find listings differently. A location page lists listings by the city, region or country saved on each listing. A near search measures the distance from the searched point to each listing’s map pin, and only returns listings inside the radius.
If a listing is missing from a near search, check:
- The listing’s latitude and longitude. Edit it and look at where the pin sits on the map. A wrong pin can put it outside the radius even though the city is right.
- Search near radius in GeoDirectory > Settings > General > Search.
- Any distance chosen in the search bar, which narrows the radius further.