Templates and hooks
Reign GeoDirectory Addon overviewPremiumGet Reign GeoDirectory Addon →
Reign GeoDirectory Addon 2.5.0 needs Reign 8.1.0 or newer. Everything it prints comes from a template you can override.
Templates
Section titled “Templates”Copy a file from the add-on’s templates/ folder to {child-theme}/geodirectory/reign/{same path} and edit the copy. Each file starts with a comment listing its variables and hooks, and an @version line you can compare after an update.
| Template | Shows | Variables |
|---|---|---|
places/tab.php |
The Places tab: heading, Add button, listings or empty state | $user_id, $post_type, $label, $singular, $name, $own, $add_url, $count, $layout, $per_page, $page |
places/layout-default.php |
Two-column cards, six per page, with a pager | $user_id, $post_type, $per_page, $page |
places/layout-list.php |
List rows, six per page, with a pager | $user_id, $post_type, $per_page, $page |
places/empty.php |
The member has no published listings | $label, $singular, $name, $own, $add_url |
peepso/card.php |
The preview card under a PeepSo feed post about a listing | $listing_id, $title, $url, $excerpt, $thumb, $embed, $review |
Every template has three extension points, named after the part (for example places_tab, places_layout_list, peepso_card):
reign_geodir_{part}_datafilters the variables before the template runs.reign_geodir_before_{part}andreign_geodir_after_{part}fire around it.reign_geodir_locate_templatefilters the file that is used. It receives the path and the part name (for exampleplaces/tab).
The file is looked up in the child theme, then the parent theme, then the add-on: {theme}/geodirectory/reign/places/tab.php. When a theme copy has an older @version than the add-on part, the settings screen lists it under Update status, under “Outdated template overrides”.
The layouts print GeoDirectory’s own [gd_listings] shortcode (layout=2 for Default, layout=0 for List). The add-on registers no shortcode of its own.
Settings
Section titled “Settings”Reign Settings > Integrations, then Configure on the GeoDirectory tile holds seven switches (Places tab, and three activity and three notice switches for new listing, favourite and review) and the Default or List layout. See Settings. Saved settings are never deleted, including when the add-on is deactivated, paused or uninstalled.
The 13 hook names from 2.4.0
Section titled “The 13 hook names from 2.4.0”These names still work and keep the arguments they had in 2.4.0. Every other 2.4.0 hook was dropped, including reign_load_geodirectory_assets, wbtm_geodirectory_extender_vertical_tabs, modify_peepso_learndash_main_tab_title and reign_other_premium_addon_license_panel. On PeepSo the review hook name is applied to the favourite post text, as in 2.4.0, and the PeepSo review post has no text filter.
| Hook | Type | What it changes |
|---|---|---|
reign_geodir_add_location_activity_filter |
filter | Text of the “new listing” feed post (BuddyPress, BuddyBoss). Arguments: $text, $link, $author_id |
reign_geodir_add_favorite_activity_filter |
filter | Text of the “marked as favourite” feed post. Arguments: $text, $link, $user_id |
reign_geodir_add_location_review_activity |
action | Fires just before a review feed post is added (comment id, comment) |
reign_geodir_add_location_review_activity_filter |
filter | Text of the review feed post. Arguments: $text, $review_link, $member_id |
reign_geodir_add_location_review_transition_activity_filter |
filter | Text of the feed post when a held review is approved. Arguments: $text, $review_link, $member_id |
reign_peepso_geodir_add_location_activity_filter |
filter | Text of the “new listing” PeepSo post. Arguments: $text, $title, $author_id |
reign_peepso_geodir_add_location_review_activity_filter |
filter | Text of the favourite PeepSo post (the name is from 2.4.0 and is kept; despite “review”, it filters favourites). Arguments: $text, $title, $user_id |
reign_peepso_geodir_review_activity_filter |
filter | Text of the review PeepSo post. New in 2.5.0. Arguments: $text, $title, $member_id |
reign_geodir_peepso_places_per_page |
filter | Listings per page on the PeepSo Places tab. Argument: $per_page |
reign_geodir_new_place_notification_batch_size |
filter | Members notified per run for a new listing (default 200). Argument: $size |
bp_geodir_add_location_notification_format |
filter | Text and link of the new-listing notification. Arguments: $out, $place_id, $note_id, $format |
bp_geodir_marked_favorite_notification_format |
filter | Text and link of the favourite notification. Arguments: $out, $item_id, $place_id, $note_id, $format |
bp_geodir_marked_review_notification_format |
filter | Text and link of the review notification. Arguments: $out, $item_id, $place_id, $note_id, $format |
reign_geodirectory_addon_loaded |
action | The add-on has loaded |
New in 2.5.0
Section titled “New in 2.5.0”| Filter | Default | What it changes |
|---|---|---|
reign_geodir_places_per_page |
6 |
Listings per page on the tab (PeepSo also runs reign_geodir_peepso_places_per_page on top) |
reign_geodir_profile_post_types |
every listing post type | Post types on the tab. You can only remove types, not add one that is not a listing type |
reign_geodir_places_tab_label |
post type name, or “Places” with several types | Tab label. Argument: $label |
reign_geodir_places_tab_slug |
first post type’s own slug (places on a stock site) |
Tab address on BuddyPress and BuddyBoss. Argument: $slug. PeepSo uses geodir-places |
reign_geodir_default_settings |
the built-in defaults | The default value of every setting before a saved value applies. Argument: $defaults |
reign_geodir_is_bulk_context |
true for an importer, GeoDirectory’s CSV import, Bulk Edit or WP-CLI |
Whether a publish is part of a bulk run, which posts and notifies nothing for new listings. Argument: $bulk |
reign_geodir_peepso_card_use_oembed(defaultfalse, arguments$use,$listing_id) returnstrueto use the oEmbed card instead of the plain card. The oEmbed frame keeps a white page in dark mode.
Two actions, reign_geodir_favourite_added and reign_geodir_favourite_removed, run when a favourite made through GeoDirectory’s Fast AJAX (which loads no community plugin) is replayed on the member’s next normal request. Arguments: $listing_id, $user_id.
Examples
Section titled “Examples”Add a line after the Places tab content. Every template’s after action receives the template variables.
add_action( 'reign_geodir_after_places_tab', function ( $data ) { if ( $data['own'] ) { echo '<p class="my-places-tip">' . esc_html__( 'Tip: add photos to get more views.', 'reign-child' ) . '</p>'; }} );A member then sees the tip under their own Places tab. Visitors do not.
More task-based snippets, and one full template override, are in Common changes with a few lines of code.
Good to know
Section titled “Good to know”- A site that had a saved 2.4.0 settings section keeps the tab address and label it had; a stock
placeslug keeps working. See Updating from 2.4.0. - Each tab lists only the member’s published listings, six per page, paged with
?paged=N. - With more than one listing post type, BuddyPress and BuddyBoss get a sub-nav with one item per type (slug
my-plus the post type with underscores as hyphens, for examplemy-gd-place), PeepSo gets a post-type switch (?pt=), and the admin bar has a “My places” item. - BuddyBoss ReadyLaunch is not supported. The tab still loads and lists the member’s places inside ReadyLaunch, but the cards use ReadyLaunch’s own styles and are not polished. Keep ReadyLaunch off on sites that use this add-on.
- Licence and updates are handled in Reign Settings > License (Reign 8.1.0). On older Reign the add-on pauses with an admin notice and keeps its settings.

