Answers to common GeoDirectory questions about listing pages. Click a question to open the answer.
Check that the listing has a category. GeoDirectory listing URLs usually include the category, so a listing with no category gets a broken link that leads to a 404 page. This happens most often with a new post type that has no categories yet.
- Create at least one category for the post type, for example under Events > Categories.
- Edit the listing, tick a category and set it as the default category, then update it.
- Go to Settings > Permalinks and click Save Changes to refresh the rewrite rules.
If the listing has a category and still shows a 404, work through Why do I get a 404 Page Not Found error?.
Do not add the expand class to the Business Hours field itself, because that class is used everywhere the field shows, including archives and the home page. Add it only to the business hours on your details page instead.
Edit your GD Details page (set in GeoDirectory > Settings > General > Pages) and add a GD > Post Meta block or shortcode for the field with the gd-bh-expanded CSS class:
[<span></span>gd_post_meta key="business_hours" css_class="gd-bh-expanded"]
Archive and home page listings keep the short “open now” dropdown. If business hours show in their own tab on the details page, they are already expanded there. See How to set business hours and time zone for setting the hours.
Add the GD > Listings block or shortcode to any page and set its category. For example:
[<span></span>gd_listings post_type="gd_place" category="12" post_limit="10"]
Replace 12 with your category ID (hover the category in Places > Categories to see it). You can then write your own text and add images around it on the same page. Every option is explained in GD > Listings.
If you would rather keep the automatic category page, edit the category and use the Category Top Description field for your extra content.
Each category has its own icons. Go to Places > Categories (or the categories of your other post types), edit the category and change:
- Category Icon and Category Color: the Font Awesome icon and colour shown wherever categories are listed with icons, such as the GD > Categories block.
- Map Icon: the image used as the map marker. If a category has no Category Icon, lists use this image instead.
- Default Listing Image: used by the GD > Categories block when you tick its Use category image option.
The GD > Categories block also has a Hide icon option. There is no separate icon setting for the listing detail page, so if you want different icons only there, you need custom CSS that targets that page.
Yes. You do not need any custom code for either.
To show a shortcode in its own tab on the listing page, go to Places > Settings > Tabs (or the Tabs page of your other post type), drag a Shortcode item into the tab list, give it a name and put the shortcode in its content. The same shortcode then shows on every listing of that type. How to use the tabs builder has the details.
If the content differs per listing, add a Textarea or HTML custom field and type the shortcode into it when editing the listing. GeoDirectory runs shortcodes when it displays those fields, so the output appears wherever the field is shown, including its own tab.
Give that block its own archive item template. The GD > Listings block normally uses your main archive item page, which is why it shows the description and other details.
- Create a new page, for example “Compact listing item”.
- Add only the blocks you want: GD > Post Images, GD > Post Title, and GD > Post Rating or GD > Post Favorite. Publish it, but do not link to it anywhere.
- Edit your GD > Listings block and, under Card Design, set Archive Item Template Type to Page ID.
- Choose your new page in Archive Item Template Page.
Your archive pages keep the full layout. Set Layout to Grid View (Four Columns) for a single row of four, and use Sort by (Latest, Highest rating and so on) for each row. The same settings work for a GD > Listings widget in a sidebar.
Where the title sits depends on your theme, because the theme prints the title, not GeoDirectory. With the Supreme Directory theme, the details page header is built in PHP, and you can add a badge straight after the title with a filter. This one puts a badge before the address line:
add_filter( 'sd_details_output_address_shortcode', function( $shortcode ) {
$badge = '[<span></span>gd_post_badge key="for_sale" condition="is_not_empty" badge="For Sale" bg_color="#ed6d61" txt_color="#ffffff"]';
return $badge . $shortcode;
} );
Change the key to your own custom field key and the text and colors to suit. With other themes, add a GD > Post Title block to your GD Details page and put the GD > Post Badge block right under it. See GD > Post Badge for all the badge options. Badge icons use a Font Awesome icon class.
GeoDirectory has no setting of its own for this. It saves files through the normal WordPress upload functions, so the core upload_dir filter changes where listing images go.
Two details matter. New uploads first go to a temporary /geodir_temp folder and move to the real folder when the listing is saved, so leave that folder alone. And your filter must change subdir, path and url together.
To put listing images in uploads/places/2026/10, hook a function to upload_dir at priority 20, so it runs after GeoDirectory’s own, and in it:
- Return the array unchanged when
subdiris/geodir_temp. - Check that
$_REQUEST[<span></span>'post_type']is a GeoDirectory post type withgeodir_is_gd_post_type(). - Set
subdirto/placesplus the existing subdir, then setpathtobasedirplus the new subdir andurltobaseurlplus the new subdir.
This means WordPress matched the listing URL to an archive page instead of the single listing, which comes down to permalinks. Try these in order:
- Go to Settings > Permalinks and click Save without changing anything. This rebuilds the rewrite rules.
- Check GeoDirectory > Settings > General > Pages and make sure the Details Page is set to your GD Details page.
- In Settings > Permalinks, under GeoDirectory permalinks, try the “Full location” structure (or add
%city%or%category%to a custom one) so listing URLs can’t collide with other URLs, then save. - Make sure no normal page or post uses the same slug as your post type, category or listing.
More on the options: Permalink settings.
Set the layout on the GD > Loop block (or the [<span></span>gd_loop] shortcode) in your archive template. GeoDirectory > Settings > General > Pages shows which page is your Archive template. Edit that page and set Layout to List view, or use [<span></span>gd_loop layout="0"]. The numbers 1 to 5 give a grid with that many columns.
Each listing in the loop is drawn from the Archive Item template on the same settings page. Edit that page to choose what each row shows, such as the image, title, rating, address and a short description. GD > Archive Item Section splits an item into left and right columns.
If you add the GD > Loop Actions block, visitors can switch between list and grid themselves. Design or customize GeoDirectory pages has more on the templates.
The description in listing cards comes from the GD > Post Content block ([<span></span>gd_post_content]) in your Archive Item template, and its settings decide how the read more looks.
- Word limit cuts the text after that many words and puts the read more link after it.
- Max height cuts the text at a fixed height and fades it out under the read more link. Leave it empty if you don’t want the fade over the text.
- Read more link sets the link text. Enter
0to hide the link.
Read more links to the full listing. To edit the block, find your Archive Item page at GeoDirectory > Settings > General > Pages. Change the length of the text shown with GD Loop and GD Listings has more examples.
Listings in GD > Listings blocks, including related listings, use your Archive Item template, and the description comes from the GD > Post Content block in that template. Removing it there removes it everywhere listings show.
To remove it only from related listings:
- Make a copy of your GD Archive Item page and remove the description (and anything else you don’t want) from the copy.
- Edit the GD > Listings block that shows the related listings.
- Under Card Design, set Archive Item Template Type to Page and choose your new page as the Archive Item Template Page.
Related listings are a GD > Listings block with “Filter listings related to” set to categories or tags.
Use CSS that targets the three column layout. With the current GeoDirectory design, a three column grid has the class row-cols-md-3, and the description has the class geodir-field-post_content. Add this in Appearance > Customize > Additional CSS:
.row-cols-md-3 .geodir-field-post_content { display: none; }
List view and the other grid sizes keep the excerpt. To shorten the text everywhere instead of hiding it, see change the length of the text shown with GD Loop and GD Listings.
Set the layout on the archive template and hide the grid choices in the layout switcher.
- Edit the page set as Archive page in GeoDirectory > Settings > General > Pages (do the same for the Search page).
- In the GD > Loop block, set Layout to List view.
- In the GD > Loop Actions block, select every grid option in Hide Layouts so only List is left, then update the page.
To remove the layout button completely, add this to Appearance > Customize > Additional CSS:
.gd-list-view-select {
display: none;
}
The browser remembers a visitor’s last layout choice, so a visitor who picked a grid earlier may need to clear their site data before they see the list.
GeoDirectory uses normal WordPress pages as templates for listing pages, so the sidebar comes from the page template your theme applies. Go to GeoDirectory > Settings > General > Pages, open the Details Page (or Archive page) in the editor, and pick your theme’s full width template under Page Attributes or Template.
For the listing page you can also set Page template file override in GeoDirectory > Settings > Design > Details.
To hide tabs such as Reviews or Photos, edit the tabs in Places > Settings > Tabs. See How to use the Tabs Builder in GeoDirectory.
It tells search engines what kind of business or place the listings in that category are. GeoDirectory adds structured data (JSON-LD) to each listing’s details page, and the schema type of the listing’s default category is used as its type.
If you leave it blank, the listing is marked as a LocalBusiness, and event listings as an Event. Picking a closer match, such as BedAndBreakfast for a bed and breakfast category, gives search engines a more accurate description. If none of the options fit, leaving it blank is fine.
You set it when you add or edit a category, for example in Places > Categories.
GeoDirectory saves listing fields in its own database table, not in the normal WordPress post meta table, so a plugin that reads post meta straight from the database will not find them.
Plugins that use the standard get_post_meta() function can still read them. Add geodir_ in front of the field key, for example geodir_phone or geodir_website, and GeoDirectory returns the value.
If the plugin accepts shortcodes, use GD > Post Meta, for example [<span></span>gd_post_meta key="phone" show="value"]. Add id="123" to show a value from a different listing.
If neither works, the plugin reads the database directly, and you would need to ask its author for support for custom tables.