This page has the most frequently asked questions, but every addon or theme has its own set of FAQs. Follow the links to go there direct:

Memberships and Support

The best option is to become a paid member which is $199/year, with membership you will get access to all of our premium plugins and themes and any new ones we create while you are a member, you also will have full access to our support forums. If you do not renew your membership after one year then you will lose access to the premium support forums and to any updates of addons however you can continue to use the ones you have even without a membership. Add-ons can also be bought individually if required.

Please log in to rate this.
1 person found this helpful. Permalink


Yes, please see this page for our basic instillation guide: https://wpgeodirectory.com/docs/basic-installation/

Please log in to rate this.
4 people found this helpful. Permalink


Review Setup of Automatic Updates
Find the setup guide for autoupdates here: https://wpgeodirectory.com/docs/installing-addons/#updates

Double Check Licensing and Membership
Make sure your licenses are added at WordPress > Installed Plugins and that your membership is active.

Update Licenses when Changing Site URL
Whenever your site domain changes you will need to update the license for each plugin. This involves removing the license key, refreshing the page, and then re-adding the license key. This process is required for example when changing the URL/domain of a site, adding WWW, or moving from staging.mysite.com to www.mysite.com. The licenses must be de-activated and re-activated for the new domain; in the meantime updates will be seen as unauthorized and denied.

Please log in to rate this.
1 person found this helpful. Permalink


When your WordPress dashboard tells you that a GD plugin needs to be updated, best practice would be to follow these steps:
Only update your core GD plugin if you are able to update all your GD addons: GD is only guaranteed to work with the latest version of both core and addons, a mismatch of versions is very likely to lead to problems!

  1. Create a backup of all your files and database, for example copy all your website files using your FTP client like FileZilla and backup your database from your control panel.
    There are different ways to create backups, just make sure you know how to revert.
    (If you use cPanel, you can create a full backup with a single click)
  2. Then update the GD core plugin only. There is no need to de-activate first.
  3. Then update all the other GD plugins.
  4. Have a check of your public site and if you see any problems, go to your WP admin area > GeoDirectory > GD Tools, and run your database checks.
  5. The version of OpenSSL on your server needs to be at least 1.0 or you will not be able to update from your WP admin area. If updates are not working, get your host to check the OpenSSL version and update if required.
    If your OpenSSL version is older than that, you can update your addons using FTP only.

Setup Automatic Updates with WP Easy Updates
See the guide here: https://wpgeodirectory.com/docs/installing-addons/#updates

Please log in to rate this.
6 people found this helpful. Permalink


To review the changelog of a GD addon or theme, navigate to the GD addons or GD themes page, click on the addon or theme you want to check, and append ?changelog=1 to the URL.
For example the changelog for the GD Framework is at
https://wpgeodirectory.com/downloads/geodirectory-framework-theme/?changelog=1
and the changelog for the Location Manager is at
https://wpgeodirectory.com/downloads/location-manager/?changelog=1

The changelog for the core plugin is at https://wpgeodirectory.com/change-logs/#v1.6.6

Please log in to rate this.
4 people found this helpful. Permalink



Memberships and Support

Troubleshooting

A category will only show on your map if there is at least one listing in that category.
And that category has not been selected at the Home Map Settings with the result the listing will not show on the first load of the location page.

Please log in to rate this.
0 people found this helpful. Permalink


The most common reasons are:

  1. The listing is not in a category (Read more…)
  2. The listing is missing other required data (basic fields include but are not limited to: Title, Author, Content (Description), Category, Post Type, Address, City, Region, Country, Latitude, Longitude, Status) (Read more…)
  3. You have navigated to a different location
  4. You are using some page caching that is not compatible with GD. GD Booster is specifically designed to work with GD sites and will also cache your other pages.
  5. “Near Me” features require an SSL certificate (Read more…)

Please log in to rate this.
0 people found this helpful. Permalink


If you get a PHP warning on your pages (and not a fatal error), then add this to your child theme’s functions.php or as a Code Snippet to suppress the PHP warnings:

error_reporting(E_ERROR);

Please log in to rate this.
11 people found this helpful. Permalink


This usually happens when you change a theme, because your menu settings and page layout change.
You just will have to revisit your widgets and menu settings.

Please log in to rate this.
0 people found this helpful. Permalink


Sometimes your users add locations to your database using different spelling than a location already in your database (for example LasVegas, Texas, US instead of Las Vegas, Texas, United States).
Your GD database will treat this as two different locations.
There is a tool to merge these two locations.

  1. Go to your admin area, and navigate to the Manage Locations tab in Multilocations.
  2. Select the locations you want to merge.
  3. Scroll to the bottom of the page, and click Merge.
  4. On the next page, select the correct location you want to keep, and then click Set Primary.
  5. That will re-assign the correct location to all your listings in any of the locations you merged.

Do not delete a location because that will also delete any listings in that location!!

You can also use the above process to correct any of your locations: just add the correct location first and then merge with any incorrect locations.

Merging locations

Please log in to rate this.
5 people found this helpful. Permalink


If you have set up your site to ask visitors for their location so you can serve them the closest listings in your directory, then their answer will usually be saved by the browser.
When that visitor returns to your site, they will not be asked again for their location, because their previous choice to be geo-located or not, was saved by the browser.
You can clear this saved settings:

Please log in to rate this.
5 people found this helpful. Permalink


If you receive this error message, it means that things like import / export won’t work as they can’t read or write files to your system.
Review this post to solve this problem.

Please log in to rate this.
0 people found this helpful. Permalink


GeoDirectory is only fully compatible with GD Booster and WP Super Cache.
If you use WP Super Cache, you need to review the settings here.

Please log in to rate this.
5 people found this helpful. Permalink


When a new location is added, the URL might get a “-1” appended. For example
mysite.com/location/greece-1/
This happens because WP does not allow duplicate slugs, and there already is something else using the slug greece.
This is most likely to be a tag, but can also be something else.
The solution is to search the database for the slug greece and change it to greece-1.
Then search for greece-1 and replace all results (except the one you just changed) with greece.

Please log in to rate this.
2 people found this helpful. Permalink


Make sure that an email address is added to the listing, in the default custom field.
This allows email addresses for inquiries to be different than the user’s email address, and also allows users to opt out of having contact details listed.

Please log in to rate this.
0 people found this helpful. Permalink


If you want visitors to comment on listings but do not want a rating system, change the setting at GD > General > General tab > Disable rating on comments > YES

Please log in to rate this.
0 people found this helpful. Permalink


Here is a checklist for map related settings.

1# GD > Design > Maps – Valid Google Maps API Key created and saved

2# Places > Add Category – Create at least one Place Category, and add that category to your listing.

3# GD > Design > Map > SHOW / HIDE POST TYPE AND CATEGORY ON MAP – Make sure your CPT (Places etc) and your category are set to show on the map.

4# Review the basic setups docs here: https://wpgeodirectory.com/docs/basic-installation/

5# Make sure you are running the latest version of the plugin

6# Check your site for plugins known to cause conflicts https://wpgeodirectory.com/docs/known-issues/

Please log in to rate this.
1 person found this helpful. Permalink


  1. Listing not updating on FB – FB Has a cache also. Run your listing URL through the FB debugger to alert FB to recrawwl your page: https://developers.facebook.com/tools/debug/
  2. FB Tags not importing – FB does not give GD access to Tags through the API, but, the category is imported if it is set.

Please log in to rate this.
0 people found this helpful. Permalink


Check your WordPress settings at
WP > Settings > Media > Organize my uploads into month- and year-based folders:: SET
(Read more…)

Please log in to rate this.
0 people found this helpful. Permalink


1. Ensure you have a fixed width on the widget
2. Ensure there is at least one additional widget for the sidebar.
Sample Shortcode

[gd_listing_map width=100% height=600 sticky=true autozoom=true marker_cluster=on]

3. If you are using a 3rd party theme, the map may be ‘underneath the page’ and adding the following CSS to GD > Design > Scripts > CSS

.geodir_map_container {
    z-index: 100;
}

Please log in to rate this.
0 people found this helpful. Permalink


You can try the following CSS, and if it doesn’t work, please create a new support ticket where we can take a look at your site.
Add CSS to GD > Design > Scripts > Custom CSS

.geodir-page .fl-sidebar {
    width:30%
}
.geodir-page .fl-content {
    width:65%
}

Please log in to rate this.
0 people found this helpful. Permalink


The best reason to make your site secure is to protect your site visitors; SSL certificates protect the connection between your site and your site visitors. Here are some other reasons:

  1. GeoLocation features require a secure connection.
  2. Accepting Payments? Most gateways like Stripe require that any page hosting a live checkout form be SSL.
  3. Sites without secure connections trigger warnings in some browsers. These warnings can turn your visitors away.
  4. It’s relatively easy to do.
  5. There are lots of pricing options.

Find out more about SSL certificates from Google at this link.

Are you getting “mixed content” errors in the console? See this FAQ.

Please log in to rate this.
0 people found this helpful. Permalink


Mixed content errors can cause a wide variety of issue for a site. This is an especially common issue for sites that are just now changing to “https” URL by adding an SSL certificate. What happens is, your main site URL has changed, but not all of the LINKS and RESOURCES on your site have been updated to the new URL. If your old images are still at an “http” URL (oh no!) and so the images might not even show up, or appear to be missing.

See this page for instructions on how to open the chrome console to view errors like these.

Problems that can be created by mixed content issues:

  • Images appear to be missing
  • Map doesn’t load, appears ‘greyed out’
  • Search isn’t returning correct/any results
  • Facebook or other integrations aren’t functional
  • SSL indicator in browser says “Your connection is not secure” even though you did add an SSL certificate.

Solutions

No SSL? Get SSL

Every host offers a technical method for adding an SSL certificate, and we have covered that on our blog here. You can also read about other methods here.

Short term – Cover up the mixed-content symptoms

You can use a plugin to “cover up the symptoms” of mixed content. This can be a good quick fix, but it puts a small strain on your site, and doesn’t actually fix the underlying problem. It is also another plugin that you have to keep installed and on all the time. Here are some instructions. There is nothing wrong with using this for a quick fix while you work on a real solution.

Address the Cause and Change “http” to “https” in your database”

We recommend going a step further to replace your old http URLs with shiny new HTTPS URLs using the
“Better Search Replace” plugin from WordPress. You can follow this link to instructions for how to search and replace any text in your database. To change the URLs, you would search for http://mysite and replace with https://mysite.

Please log in to rate this.
0 people found this helpful. Permalink


Review Setup of Automatic Updates
Find the setup guide for autoupdates here: https://wpgeodirectory.com/docs/installing-addons/#updates

Double Check Licensing and Membership
Make sure your licenses are added at WordPress > Installed Plugins and that your membership is active.

Update Licenses when Changing Site URL
Whenever your site domain changes you will need to update the license for each plugin. This involves removing the license key, refreshing the page, and then re-adding the license key. This process is required for example when changing the URL/domain of a site, adding WWW, or moving from staging.mysite.com to www.mysite.com. The licenses must be de-activated and re-activated for the new domain; in the meantime updates will be seen as unauthorized and denied.

Please log in to rate this.
1 person found this helpful. Permalink


When your WordPress dashboard tells you that a GD plugin needs to be updated, best practice would be to follow these steps:
Only update your core GD plugin if you are able to update all your GD addons: GD is only guaranteed to work with the latest version of both core and addons, a mismatch of versions is very likely to lead to problems!

  1. Create a backup of all your files and database, for example copy all your website files using your FTP client like FileZilla and backup your database from your control panel.
    There are different ways to create backups, just make sure you know how to revert.
    (If you use cPanel, you can create a full backup with a single click)
  2. Then update the GD core plugin only. There is no need to de-activate first.
  3. Then update all the other GD plugins.
  4. Have a check of your public site and if you see any problems, go to your WP admin area > GeoDirectory > GD Tools, and run your database checks.
  5. The version of OpenSSL on your server needs to be at least 1.0 or you will not be able to update from your WP admin area. If updates are not working, get your host to check the OpenSSL version and update if required.
    If your OpenSSL version is older than that, you can update your addons using FTP only.

Setup Automatic Updates with WP Easy Updates
See the guide here: https://wpgeodirectory.com/docs/installing-addons/#updates

Please log in to rate this.
6 people found this helpful. Permalink



Translation

Yes please you can translate the Core plugin in the WordPress.org page and all of our products easily here: https://www.wpgeodirectory.com/translate/projects

Please log in to rate this.
0 people found this helpful. Permalink


When adding the Events Calendar Widget, you will have 4 options for the format of the day:

If you want to translate the days on the calendar, you will have to choose another option than the first option.
In the translation file for the Events Manager, you can then translate the strings that match the option you have chosen.

Please log in to rate this.
1 person found this helpful. Permalink


To translate the “New” and “Featured” banners used for GD listings, you can copy and paste the blank images below, adjust them as required and upload to your website. Then add the following CSS:

.geodir_new_listing {
    background: url('http://reference to your new image') no-repeat scroll left top transparent;
}
ul li .geodir_featured_img {
    background: url('http://reference to your featured image') no-repeat;
}

Right-click to download and save:

  

Please log in to rate this.
3 people found this helpful. Permalink


To change Place Title and Place Description on the Add Listing page, you need to use the language file and look for %s Title and %s Description.
%s refers to the singular name of the custom post type, which you can set using the Custom Post Types addon, or by translating Place and Places in the language file.
For example to change Place Title to Business Name, you would translate %s Title to %s Name, and change Place to Business.

Please log in to rate this.
3 people found this helpful. Permalink


Only countries can be translated, regions and cities cannot be translated.
Please review this documentation: Translating countries and map directions

Please log in to rate this.
1 person found this helpful. Permalink



Translation

Customizing your GeoDirectory site

To disable reviews go to WP Settings > Discussion and disable comments.
For listings already in your database you have to disable comments for each listing, or with a bulk quick edit.
To remove the review icons from the map bubble (infowindow), add this CSS:

.geodir_Star {display: none;}
.geodir-bubble-meta-bottom .geodir-bubble-reviews {display: none;}

Please log in to rate this.
9 people found this helpful. Permalink


Add the following CSS, it will remove ‘favorites‘ everywhere:

.geodir-addtofav, .geodir_category_list_view li .geodir-addinfo a.geodir-pcomments, .geodir_category_list_view li .geodir-addinfo span {
    display: none;
}

Please log in to rate this.
11 people found this helpful. Permalink


To disable related listings on the detail pages, please go to GeoDirectory > Design > Detail and where it says “Show related post listing on”, add the post types where you want to hide related listings.

Please log in to rate this.
3 people found this helpful. Permalink


When you install GD, the directory page will be able to be accessed at yourGDsite.com/location.
You can change the title and slug of these pages at the normal WordPress pages settings, just look for the Location page there.
Go to GD > Permalinks and make sure you selected the correct page at GeoDirectory Pages.
To change the name in breadcrumbs, translate Location in the GD core language file (more info about translations here).

Please log in to rate this.
0 people found this helpful. Permalink


Your listings and search pages will automatically return the amount of listings per page, as set in the WordPress settings.
To change this, go to
WP Admin > Settings > Reading > Blog pages show at most
Note: Some themes have their own settings for the number of post displayed (for example Divi).

Please log in to rate this.
9 people found this helpful. Permalink


When adding a YouTube video to a listing, you should use YouTube’s embedding code, for example:
<iframe width="640" height="360" src="//www.youtube.com/embed/_VZqtc_BP1U" frameborder="0" allowfullscreen></iframe>

Please log in to rate this.
2 people found this helpful. Permalink


  1. Review this article to change the way the address is displayed in each separate area and to add HTML to the output: Changing the layout of addresses
  2. Hide specific portions of the address with CSS | Read more…
  3. By default only the street address shows if you choose to display the address in the map bubble.
    You can also show the city, region, country or postcode by adding any or all of the following CSS:

    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="streetAddress"] +br {display: initial;} /* Adds a line break after the street address */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"] {display: initial;} /* Makes the city show */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"]:after {content: ", ";} /* Adds a comma and a space after the city */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressCountry"] {display: initial;} /* Makes the country show */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="postalCode"] {display: initial;} /* Makes the postcode show */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressRegion"] {display: initial;} /* Makes the region show */
    

  4. Additional formatting for Supreme Directory Theme | Read more… (Members Forum Topic)

Please log in to rate this.
1 person found this helpful. Permalink


When installing the main GeoDirectory plugin (GD Core) a default custom post type is created called Places.
There are 2 ways to change that to your choice:

  1. Install the Custom Post Type addon, then you can change all Places default wording easily.
  2. Use the GD core translation file to change the wording.

Please log in to rate this.
10 people found this helpful. Permalink


By default only the street address shows if you choose to display the address in the map bubble.
You can also show the city, region, country or postcode by adding any or all of the following CSS:

.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="streetAddress"] +br {display: initial;} /* Adds a line break after the street address */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"] {display: initial;} /* Makes the city show */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"]:after {content: ", ";} /* Adds a comma and a space after the city */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressCountry"] {display: initial;} /* Makes the country show */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="postalCode"] {display: initial;} /* Makes the postcode show */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressRegion"] {display: initial;} /* Makes the region show */

Please log in to rate this.
1 person found this helpful. Permalink


If you want visitors to comment on listings but do not want a rating system, change the setting at GD > General > General tab > Disable rating on comments > YES

Please log in to rate this.
0 people found this helpful. Permalink


You can add a URL custom field called Instagram.
To add an Instagram icon, add fa fa-instagram as the Upload icon option:

You can see an example here.

Please log in to rate this.
2 people found this helpful. Permalink


Some members may want to add html to their CPT custom field drop down to highlight a choice. This is not possible, but you can do a ‘string replace’ to find some text and replace it with some html. Here’s an example using the field ‘myDropDown’ to add tags to the words ‘BOLD ME’.

// Filter geodir_myDropDown field content.
function _gd_custom_customize_myDropwDown( $html, $location, $cf, $p = 0 ) {
    if ( ! empty( $html ) && ! empty( $cf['htmlvar_name'] ) && $cf['htmlvar_name'] == 'geodir_myDropDown' ) {
        $html = str_replace( ' BOLD ME ', ' <strong>BOLD ME</strong> ', $html );
    }

    return $html;
}
add_filter( 'geodir_custom_field_output_select', '_gd_custom_customize_myDropDown', 100, 3 );

Please log in to rate this.
0 people found this helpful. Permalink


To reveal Advanced Pagination before the search results, there are three steps:

1. Go to GD > Design > Search > Show advanced pagination details -> Before Pagination

2. Add PHP Snippet with the Code Snippets plugin : https://wpgeodirectory.com/docs/useful-plugins/#snippets

add_action('geodir_before_listing', 'geodir_pagination',100);

3. Go to GD > Design > Scripts > Custom CSS and Add the following CSS to reveal the pagination

.sd .geodir-common .clearfix .Navi {
    display: inline !important;
}

Please log in to rate this.
0 people found this helpful. Permalink


This page shares examples for developers to customize GeoDirectory features. The most commonly used code snippets are located here, and the most common CSS styling changes are here. Developers using any of the examples will need to create their own custom styles to attain final results. For instructions about how to change styles or add snippets, please see Customizing Your Style. For support with these examples, please contact a developer at the GD Experts Directory.

Listing Page – Add the author image to the listing

This Snippet will add the listing author image to each listing shown on the listing page. The image will appear after the listing title. You will need to create your own CSS to adjust the position and style of the image to meet your own needs.

add_action('geodir_after_listing_post_title', 'avatar_geodir_after_listing_post_title');
function avatar_geodir_after_listing_post_title($view, $post) {
	$author_id = $post->post_author;
	$author_link = get_author_posts_url($author_id);
	$entry_author = get_avatar( $author_id, 60 );
	echo sprintf('<div class="author-avatar"><a href="%s">%s</a></div>', esc_url($author_link), $entry_author);
}

Listing Page – Add linked business information to event listings

This Snippet will add linked business information to each event listing.

add_action('geodir_after_listing_post_title','_my_custom_geodir_event_display_link_business');
function _my_custom_geodir_event_display_link_business() {
	global $post;
	$post_type = geodir_get_current_posttype();
	$all_postypes = geodir_get_posttypes();

	if ( !empty( $post ) && $post_type == 'gd_event' && isset( $post->geodir_link_business ) && !empty( $post->geodir_link_business ) ) {
		$linked_post_id = $post->geodir_link_business;
		$linked_post_info = get_post($linked_post_id);
		if( !empty( $linked_post_info ) ) {
			$linked_post_type_info = in_array( $linked_post_info->post_type, $all_postypes ) ? geodir_get_posttype_info( $linked_post_info->post_type )  : array();
			if( !empty( $linked_post_type_info ) ) {
				$linked_post_title = !empty( $linked_post_info->post_title ) ? $linked_post_info->post_title : __( 'Listing', 'geodirevents' );
				$linked_post_url = get_permalink($linked_post_id);

				$html_link_business = '<div class="geodir_more_info geodir_more_info_even geodir_link_business"><span class="geodir-i-website"><i class="fa fa-link"></i> <a title="' . esc_attr( $linked_post_title ) . '" href="'.$linked_post_url.'">' . wp_sprintf( __( 'Go to: %s', 'geodirevents' ), $linked_post_title ) . '</a></span></div>';

				echo apply_filters( 'geodir_more_info_link_business', $html_link_business, $linked_post_id, $linked_post_url );
			}
		}
	}
}

Listing Page – Use a custom field “company logo” image as the listing thumbnail

This is a multi-step snippet that requires configuration that matches the code below. Consult a developer if it doesn’t work for you.


function modify_geodir_featured_image($post) {
	if ($post->geodir_company_logo) {
		?>
		<a class="packageplus_company_logo" href="<?php the_permalink(); ?>">
      		<img src="<?php echo $post->geodir_company_logo; ?>" />
 		</a>
		<?php
	}
}
add_action('geodir_before_badge_on_image', 'modify_geodir_featured_image');

Listing Page – Add Advanced Pagination and Show More Listings

There are a couple things a developer can do to make the Listing page fit the need.

1# Increase posts per page the WP way (Applies to Location and Listings Pages)
Use WordPress Settings to increase posts per page (Read More)

2# Customize with Advanced Pagination(Applies to Search, Location and Listings Pages)
This customization will add pagination and “Now showing 8/190” either before or after your listings.This requires a PHP Snippet, Custom CSS, and configuring a setting.
2A# Add Snippet

add_action('geodir_before_listing', 'geodir_pagination',100);

2B# Add Custom CSS

.Navi.gd-navi {display: initial !important;}

2C# Adjust Settings
Go to GD > Design > Search > Show advanced pagination details choose to show it ‘After’.

3# ServerAdmin Override for Increasing Number of Listings Shown(Caution! Applies to Listing and Search Pages)
This Member snippet will override WP settings for minimum posts to show. It is not recommended but, it works, and should be used with great caution and with the knowledge that is may increase load times. (Read More)

4# Inform Visitors with Custom Text Using Translation
You can use translation to change text that you see in the GD content areas. Follow the translation instructions at the link to find text strings, and rewrite them to give your users more information about what they are seeing (Read More)

Listing Page – Sort Listings by ‘Featured’and then ‘Overall Rating’

// Sorting the listing page results by featured & rating.
function _gd_custom_sort_by_featured_and_rating( $orderby, $sort_by, $table ) {
    if ( $sort_by == 'is_featured_asc' && !empty( $table ) ) {
        $orderby .= " " . $table . ".overall_rating DESC, " . $table . ".rating_count DESC, ";
    }

    return $orderby;
}
add_filter( 'geodir_posts_order_by_sort', '_gd_custom_sort_by_featured_and_rating', 5, 3 );

Detail Page – Remove the link to the lightbox from an image upload

function gd_strip_link_from_company_logo($html) {
	global $post;
	//$html = preg_replace('/<a href="(.*?)">(.*?)</a>/', "\1", $html);
	$html = '<img src="'.$post->geodir_company_logo.'" class="gd_company_logo_img" alt="" />';
	return $html;
}
add_filter('geodir_show_geodir_gd_bus_logo', 'gd_strip_link_from_biz_logo');

Detail Page – Change the output for “Category”and”Tags” on the detail page

add_filter('geodir_details_taxonomies_output', 'geodir_details_taxonomies_output_custom', 10, 3);
function geodir_details_taxonomies_output_custom($taxonomies, $post_type, $listing_label) {
	$new_tax = array();
	foreach ($taxonomies as $key => $tax) {
		$label = geodir_ucwords($listing_label);
		$tax = str_replace("$label Category:", "", $tax);
		//$tax = str_replace("$label Tags:", "", $tax);
		$new_tax[$key] = $tax;
	}
	return $new_tax;
}

MapBubble – Make the telephone number a clickable link

add_filter(‘geodir_map_bubble_tel_linkable’, ‘__return_true’);

Detail Page – Combine custom fields into the profile tab with layout elements

add_action('geodir_before_description_on_listing_detail', 'gd_profile_custom_content');
function gd_profile_custom_content() {
	global $post;
	?>
	<div class="gd_profile_custom_content_wrapper">
		<div class="column1">
			<div>
				<?php echo geodir_get_post_meta( $post->ID, 'custom_field_key_goes_here', true ); ?>
			</div>
			<div>
				<?php echo geodir_get_post_meta( $post->ID, 'custom_field_key_goes_here', true ); ?>
			</div>
		</div>
		<div class="column2">
			<<div>
				<?php echo geodir_get_post_meta( $post->ID, 'custom_field_key_goes_here', true ); ?>
			</div>
			<div>
				<?php echo geodir_get_post_meta( $post->ID, 'custom_field_key_goes_here', true ); ?>
			</div>
			<div>
				<?php echo geodir_get_post_meta( $post->ID, 'custom_field_key_goes_here', true ); ?>
			</div>
		</div>
	</div>
	<?php
}

Detail Page – Snippet to substitute different category icons on the Detail page

The following snippet is an example of how to substitute a new image for the category icon on the Detail page. In this example, the term with id ‘946’ is being updated with a ‘new hospital icon.png’.
Be sure to get the verified term_id from the category page.

// Change category icon on detail page
function _gd_custom_detail_page_category_icon( $terms_icons, $term_id ) {
    if ( ! empty( $terms_icons ) && ( geodir_is_page( 'detail' )  || geodir_is_page( 'preview' ) ) ) {
         // $terms_icons['TERM_ID'] = 'CATEGORY ICON URL';
         $terms_icons['946'] = 'http://mysite.com/wp-content/uploads/2018/01/new-hospital-icon.png';
    }
    return $terms_icons;
}
add_filter( 'geodir_get_term_icons', '_gd_custom_detail_page_category_icon', 10, 2 );

Detail Page – Add HTML elements at the top of the More Info tab

function geodir_before_post_info_content() {
    echo "<h2>Certifications</h2>";
}
add_action('geodir_before_post_info_tab_content', 'geodir_before_post_info_content');

Claim Listings – Redirect member claiming a listing to listing page, instead of confirmation page

function _wpi_gd_custom_redirect_to_listing_after_claim( $redirect, $gateway, $args ) {
    if ( function_exists( 'geodir_get_invoice' ) && !empty( $args['invoice_key'] ) && ( $invoice_ID = wpinv_get_invoice_id_by_key( $args['invoice_key'] ) ) ) {
        if ( $gd_invoice_ID = geodir_wpi_to_gdp_id( $invoice_ID ) ) {
            if ( ( $gd_invoice = geodir_get_invoice( $gd_invoice_ID ) ) && ( $invoice = wpinv_get_invoice( $invoice_ID ) ) ) {
                if ( !empty( $gd_invoice->post_id ) && $gd_invoice->invoice_type == 'claim_listing' ) {
                    $redirect = get_permalink( $gd_invoice->post_id );
                }
            }
        }
    }

    return $redirect;
}
add_filter( 'wpinv_success_page_redirect', '_wpi_gd_custom_redirect_to_listing_after_claim', 10, 3 );

Detail Page – Set the Category Image as the visible default featured image on listings without images

add_filter('geodir_details_default_image_show','__return_true' );

Please log in to rate this.
0 people found this helpful. Permalink


Only countries can be translated, regions and cities cannot be translated.
Please review this documentation: Translating countries and map directions

Please log in to rate this.
1 person found this helpful. Permalink



Multisite - Network

Make sure to activate all GD plugins and addons for each site, do not network activate them.

Please log in to rate this.
12 people found this helpful. Permalink


Addons

Advanced Search

If you add the GD > Near Me Button widget, and a visitor clicks on that button, they will be taken to a page showing the listings within a set radius of their geolocation.
To change this radius, go to GD > Advanced Search > GEOLOCATION SETTINGS section > Default Near Me miles limit (1-200) and change the setting there.

Please log in to rate this.
6 people found this helpful. Permalink



Claim Listings

If you are using the Claim Listings addon, the following required question will be added to the Add Listing form:

You can hide this from the form by adding some code to functions.php of your child theme or using the Code Snippets plugin.
This code will hide it and set the any new listings added from the frontend as Claimed:

function my_geodir_add_claim_fields_before_main_form(){
?>
<input type="hidden" value="1" name="claimed" />
<?php
}
remove_action('geodir_before_main_form_fields' , 'geodir_add_claim_fields_before_main_form', 1); 
add_action('geodir_before_main_form_fields' , 'my_geodir_add_claim_fields_before_main_form', 1);

Changing

<input type="hidden" value="1" name="claimed" />

to

<input type="hidden" value="0" name="claimed" />

will set all new listings added from the frontend as Unclaimed.

Please log in to rate this.
2 people found this helpful. Permalink


This usually happens if you already have listings in your system, and then activate the Claims Listing addon.
If that is the case, you can edit each listing as required, or export and re-import after setting the listings as claimed or not.

Please log in to rate this.
2 people found this helpful. Permalink



Custom Post Types

When installing the main GeoDirectory plugin (GD Core) a default custom post type is created called Places.
There are 2 ways to change that to your choice:

  1. Install the Custom Post Type addon, then you can change all Places default wording easily.
  2. Use the GD core translation file to change the wording.

Please log in to rate this.
10 people found this helpful. Permalink


To change Place Title and Place Description on the Add Listing page, you need to use the language file and look for %s Title and %s Description.
%s refers to the singular name of the custom post type, which you can set using the Custom Post Types addon, or by translating Place and Places in the language file.
For example to change Place Title to Business Name, you would translate %s Title to %s Name, and change Place to Business.

Please log in to rate this.
3 people found this helpful. Permalink



Custom Post Types

Event Manager

To change the Event times from AM/PM to a 24 hour time system please add this to your child theme functions:

function gde_24hour_times( $times ) {
	foreach($times as $key=>$val){
		$times[$key]=$key;
	}
    return $times;
}
add_filter( 'geodir_event_schedule_times', 'gde_24hour_times' );

Please log in to rate this.
1 person found this helpful. Permalink


When adding the Events Calendar Widget, you will have 4 options for the format of the day:

If you want to translate the days on the calendar, you will have to choose another option than the first option.
In the translation file for the Events Manager, you can then translate the strings that match the option you have chosen.

Please log in to rate this.
1 person found this helpful. Permalink



Event Manager

Pricing Manager

This will only happen for recurring payments. Once-off payments can be made using a credit or debit card if your users do not have a PayPal account, but for recurring payments, your user needs to agree with PayPal that PayPal pays you on a regular basis. Therefore they will need to open a PayPal account if they do not have one.

Please log in to rate this.
1 person found this helpful. Permalink



MultiLocations

Sometimes your users add locations to your database using different spelling than a location already in your database (for example LasVegas, Texas, US instead of Las Vegas, Texas, United States).
Your GD database will treat this as two different locations.
There is a tool to merge these two locations.

  1. Go to your admin area, and navigate to the Manage Locations tab in Multilocations.
  2. Select the locations you want to merge.
  3. Scroll to the bottom of the page, and click Merge.
  4. On the next page, select the correct location you want to keep, and then click Set Primary.
  5. That will re-assign the correct location to all your listings in any of the locations you merged.

Do not delete a location because that will also delete any listings in that location!!

You can also use the above process to correct any of your locations: just add the correct location first and then merge with any incorrect locations.

Merging locations

Please log in to rate this.
5 people found this helpful. Permalink


If you have set up your site to ask visitors for their location so you can serve them the closest listings in your directory, then their answer will usually be saved by the browser.
When that visitor returns to your site, they will not be asked again for their location, because their previous choice to be geo-located or not, was saved by the browser.
You can clear this saved settings:

Please log in to rate this.
5 people found this helpful. Permalink


When a new location is added, the URL might get a “-1” appended. For example
mysite.com/location/greece-1/
This happens because WP does not allow duplicate slugs, and there already is something else using the slug greece.
This is most likely to be a tag, but can also be something else.
The solution is to search the database for the slug greece and change it to greece-1.
Then search for greece-1 and replace all results (except the one you just changed) with greece.

Please log in to rate this.
2 people found this helpful. Permalink


  1. Review this article to change the way the address is displayed in each separate area and to add HTML to the output: Changing the layout of addresses
  2. Hide specific portions of the address with CSS | Read more…
  3. By default only the street address shows if you choose to display the address in the map bubble.
    You can also show the city, region, country or postcode by adding any or all of the following CSS:

    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="streetAddress"] +br {display: initial;} /* Adds a line break after the street address */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"] {display: initial;} /* Makes the city show */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"]:after {content: ", ";} /* Adds a comma and a space after the city */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressCountry"] {display: initial;} /* Makes the country show */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="postalCode"] {display: initial;} /* Makes the postcode show */
    .geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressRegion"] {display: initial;} /* Makes the region show */
    

  4. Additional formatting for Supreme Directory Theme | Read more… (Members Forum Topic)

Please log in to rate this.
1 person found this helpful. Permalink


Best practice is not to add locations, because every location will have a page created and you will only end up with empty pages.
Wait for your users to add listings and locations will be automatically created as your users add listings from the frontend.
Adding or editing locations

Please log in to rate this.
1 person found this helpful. Permalink


By default only the street address shows if you choose to display the address in the map bubble.
You can also show the city, region, country or postcode by adding any or all of the following CSS:

.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="streetAddress"] +br {display: initial;} /* Adds a line break after the street address */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"] {display: initial;} /* Makes the city show */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressLocality"]:after {content: ", ";} /* Adds a comma and a space after the city */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressCountry"] {display: initial;} /* Makes the country show */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="postalCode"] {display: initial;} /* Makes the postcode show */
.geodir-bubble-meta-side .geodir_more_info.post_address span[itemprop="addressRegion"] {display: initial;} /* Makes the region show */

Please log in to rate this.
1 person found this helpful. Permalink


If you add the GD > Near Me Button widget, and a visitor clicks on that button, they will be taken to a page showing the listings within a set radius of their geolocation.
To change this radius, go to GD > Advanced Search > GEOLOCATION SETTINGS section > Default Near Me miles limit (1-200) and change the setting there.

Please log in to rate this.
6 people found this helpful. Permalink


Each location added to your database creates a new location page based on your location template.
To add location specific content you can use the GD > Location Description widget.

Please log in to rate this.
0 people found this helpful. Permalink


Only countries can be translated, regions and cities cannot be translated.
Please review this documentation: Translating countries and map directions

Please log in to rate this.
1 person found this helpful. Permalink



Location Manager

Themes

Directory Starter Theme

To change the footer text in the Supreme or Directory Starter theme, add the following code to your functions.php file or as a code snippet if you are using the Code Snippet plugin:

add_action('after_setup_theme', '_my_sd_footer_changes',15); 
function _my_sd_footer_changes(){
	remove_action( 'dt_footer_copyright', 'dt_footer_copyright_default', 10 );
    remove_action( 'dt_footer_copyright', 'sd_footer_copyright_default', 10 );
    add_action( 'dt_footer_copyright', 'custom_dt_footer_copyright_text', 10 );
}

function custom_dt_footer_copyright_text(){
    echo '© 2018 Supreme Theme LLC. All Rights Reserved.';
}

Please log in to rate this.
22 people found this helpful. Permalink



Supreme Directory Theme

To change the footer text in the Supreme or Directory Starter theme, add the following code to your functions.php file or as a code snippet if you are using the Code Snippet plugin:

add_action('after_setup_theme', '_my_sd_footer_changes',15); 
function _my_sd_footer_changes(){
	remove_action( 'dt_footer_copyright', 'dt_footer_copyright_default', 10 );
    remove_action( 'dt_footer_copyright', 'sd_footer_copyright_default', 10 );
    add_action( 'dt_footer_copyright', 'custom_dt_footer_copyright_text', 10 );
}

function custom_dt_footer_copyright_text(){
    echo '© 2018 Supreme Theme LLC. All Rights Reserved.';
}

Please log in to rate this.
22 people found this helpful. Permalink


This can be done two ways:

  1. Add the following CSS:
    .featured-area .geodir-category-list-in {display:none;}
  2. Edit the following file /wp-content/themes/supreme-directory/inc/geodirectory-compatibility.php
    Look for 

    echo do_shortcode('[gd_popular_post_category category_limit=5]');

    and comment or delete.

Please log in to rate this.
5 people found this helpful. Permalink


Change the default author page background image, as shown on this demo here: https://wpgeo.directory/supreme-directory/author/stiofan/

define('SD_DEFAULT_FEATURED_IMAGE', 'http://your image url here');

Please log in to rate this.
1 person found this helpful. Permalink


From: https://wpgeodirectory.com/support/topic/my-account-in-supreme-directory/

For the author page

add_filter('geodir_dashboard_links', 'dt_geodir_dashboard_links_custom');
function dt_geodir_dashboard_links_custom($dashboard_link) {
	if (!is_user_logged_in()) {
		return $dashboard_link;
	}
	$post_types = geodir_get_posttypes('object');

	$user_id = get_current_user_id();
	$author_link = get_author_posts_url($user_id);
	$author_link = geodir_getlink($author_link, array('geodir_dashbord' => 'true'), false);
	
	$show_listing_link_user_dashboard = get_option('geodir_listing_link_user_dashboard');
	$user_listing = geodir_user_post_listing_count($user_id);
	$my_listings_link = false;

	$show_favorite_link_user_dashboard = get_option('geodir_favorite_link_user_dashboard');
	$user_favourite = geodir_user_favourite_listing_count($user_id);
	$my_favorites_link = false;
	
	foreach ($post_types as $key => $postobj) {
		if (in_array($key, $show_listing_link_user_dashboard) && array_key_exists($key, $user_listing)) {
			if (!$my_listings_link) {
				$listing_link = geodir_getlink($author_link, array('stype' => $key), false);

				$dashboard_link .= '<li>';
				$dashboard_link .= '<i class="fa fa-user"></i>';
				$dashboard_link .= '<a href="'.$listing_link.'">';
				$dashboard_link .= __('My Listings', 'gdbuddypress');
				$dashboard_link .= '</a>';
				$dashboard_link .= '</li>';

				$my_listings_link = true;
			}
		}
	}

	foreach ($post_types as $key => $postobj) {
		if (in_array($key, $show_favorite_link_user_dashboard) && array_key_exists($key, $user_favourite)) {
			if (!$my_favorites_link) {
				$post_type_link = geodir_getlink($author_link, array('stype' => $key, 'list' => 'favourite'), false);
				
				$dashboard_link .= '<li>';
				$dashboard_link .= '<i class="fa fa-user"></i>';
				$dashboard_link .= '<a href="'.$post_type_link.'">';
				$dashboard_link .= __('My Favorites', 'gdbuddypress');
				$dashboard_link .= '</a>';
				$dashboard_link .= '</li>';

				$my_favorites_link = true;
			}
		}
	}
	
	
	return $dashboard_link;
}

For the dashboard area

add_action('sd_my_account_logged_in_extras', 'dt_geodir_dashboard_links_custom');
function dt_geodir_dashboard_links_custom() {
	if (!is_user_logged_in()) {
		return;
	}

	$dashboard_link = '';
	$post_types = geodir_get_posttypes('object');

	$user_id = get_current_user_id();
	$author_link = get_author_posts_url($user_id);
	$author_link = geodir_getlink($author_link, array('geodir_dashbord' => 'true'), false);

	$show_listing_link_user_dashboard = get_option('geodir_listing_link_user_dashboard');
	$user_listing = geodir_user_post_listing_count($user_id);
	$my_listings_link = false;

	$show_favorite_link_user_dashboard = get_option('geodir_favorite_link_user_dashboard');
	$user_favourite = geodir_user_favourite_listing_count($user_id);
	$my_favorites_link = false;

	foreach ($post_types as $key => $postobj) {
		if (in_array($key, $show_listing_link_user_dashboard) && array_key_exists($key, $user_listing)) {
			if (!$my_listings_link) {
				$listing_link = geodir_getlink($author_link, array('stype' => $key), false);

				$dashboard_link .= '<li>';
				$dashboard_link .= '<i class="fa fa-user"></i>';
				$dashboard_link .= '<a href="'.$listing_link.'">';
				$dashboard_link .= __('My Listings', 'gdbuddypress');
				$dashboard_link .= '</a>';
				$dashboard_link .= '</li>';

				$my_listings_link = true;
			}
		}
	}

	foreach ($post_types as $key => $postobj) {
		if (in_array($key, $show_favorite_link_user_dashboard) && array_key_exists($key, $user_favourite)) {
			if (!$my_favorites_link) {
				$post_type_link = geodir_getlink($author_link, array('stype' => $key, 'list' => 'favourite'), false);

				$dashboard_link .= '<li>';
				$dashboard_link .= '<i class="fa fa-user"></i>';
				$dashboard_link .= '<a href="'.$post_type_link.'">';
				$dashboard_link .= __('My Favorites', 'gdbuddypress');
				$dashboard_link .= '</a>';
				$dashboard_link .= '</li>';

				$my_favorites_link = true;
			}
		}
	}

	echo $dashboard_link;
}

Please log in to rate this.
1 person found this helpful. Permalink


BlogSidebar

The blog in Supreme doesn’t have a sidebar by default, but you can turn one on for normal pages like blog pages at:
WordPress > Customizer > Body > Sidebar

Please log in to rate this.
0 people found this helpful. Permalink


The following are examples for developers to change the Detail and Author pages of the Supreme Directory child theme. For instructions about how to change styles or add snippets, please see our page on Customizing Your Style. For support with these examples, please contact a developer at the GD Experts Directory.

Add another service link with icon – Instagram example

At the top of the detail page are a collection of icons linked with URLs to the website or Facebook page of the listing.
This snippet will replace that section, and allow you to edit the order of the icons as well as adding a new icon with link. In this example we are adding a custom URL called ‘instagram’. The field’s html name is ‘instagram’ so add a prefix ‘geodir_’. There is also an optional portion at the end to show how to replace an icon with a different font-awesome icon.

add_filter('sd_details_output_social','_my_extra_social_details',10);
function _my_extra_social_details($output){
	global $post;

	if(isset($post->geodir_instagram) && $post->geodir_instagram){

if (strpos($output, 'fa-external-link-square') !== false) {
$output = str_replace('fa-external-link-square"></i></a>','fa-external-link-square"></i></a><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
}elseif (strpos($output, 'fa-facebook-official') !== false) {
$output = str_replace('fa-external-link-square"></i></a>','fa-facebook-official"></i></a><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
}elseif (strpos($output, 'fa-twitter-square') !== false) {
$output = str_replace('fa-external-link-square"></i></a>','fa-twitter-square"></i></a><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
}else{
$output = str_replace('<div class="sd-contacts">','<div class="sd-contacts"><a rel="nofollow" target="_blank" href="' . esc_url($post->geodir_instagram) . '"><i class="fa fa-instagram"></i></a>',$output);
}

// replace some icons
$output = str_replace('fa-facebook-official','fa-wordpress',$output);

	}
	return $output;
}

PHP for Mouseover for Category Icons

From: https://wpgeodirectory.com/support/topic/supreme-directory-category-icons/
PHP

add_filter('sd_details_output_cat_links', 'custom_sd_details_output_cat_links');
function custom_sd_details_output_cat_links($cat_links) {
	global $preview, $post;
	if (!$preview) {
		$post_type = $post->post_type;
		$post_tax = $post_type . "category";
		$post_cats = $post->{$post_tax};
	} else {
		$post_type = $post->listing_type;
		$post_tax = $post_type . "category";
		$post_cats = isset($post->post_category) ? $post->post_category[$post_tax] : $post->{$post_tax};
	}

	if (is_array($post_cats)) {
		$post_cats = implode(',', $post_cats);
	}

	$cats_arr = array_filter(explode(",", $post_cats));
	$cat_icons = geodir_get_term_icon();

	$cat_links = '<div class="sd-detail-cat-links"><ul>';
	foreach ($cats_arr as $cat) {
		$term_arr = get_term($cat, $post_tax);
		$term_icon = isset($cat_icons[$cat]) ? $cat_icons[$cat] : '';
		$term_url = get_term_link(intval($cat), $post_tax);
		$cat_links .=  '<li><a href="' . esc_url($term_url) . '" title="' . esc_attr($term_arr->name) . '"><img src="' . esc_url($term_icon) . '">';
		$cat_links .= '<span class="cat-link">' . esc_attr($term_arr->name) . '</span>';
		$cat_links .= '</a></li>';
	}
	$cat_links .= '</ul></div> <!-- sd-detail-cat-links end --> </div> <!-- sd-detail-info end -->';
	
	return $cat_links;
}

Alter the address at the top of the Supreme Directory detail page

Add this Snippet to add the complete address at the top of the detail page.
Read more here

add_filter('sd_details_output_address', 'modify_sd_details_output_address');
function modify_sd_details_output_address() {
    global $post;
    $sd_address = '<div class="sd-address">';
    if (isset($post->post_address) && $post->post_address) {
        $sd_address .= apply_filters('sd_detail_address', $post->post_address, $post);
    }
    if (isset($post->post_city) && $post->post_city) {
        $sd_address .= '<br/>' . apply_filters('sd_detail_city_name', $post->post_city, $post);
    }
    if (isset($post->post_region) && $post->post_region) {
        $sd_address .= ', ' . apply_filters('sd_detail_region_name', $post->post_region, $post);
    }
    if (isset($post->post_zip) && $post->post_zip) {
        $sd_address .= ', ' . apply_filters('sd_detail_zip', $post->post_zip, $post);
    }
    $sd_address .= '</div>';

    return $sd_address;
}

Add another send enquiry link

Add an additional ‘Send Enquiry’ link that you can style with your own custom CSS
Read more

<?php global $post; if ( ! empty( $post ) && ! empty( $post->geodir_email ) ) { ?>
    <a href="javascript:void(1);" class="b_send_inquiry2" onclick="jQuery('.b_send_inquiry').click();">Send Enquiry</a>
<?php } ?>

Hide the entire featured image area

CSS to hide the featured image from the top part of the page.

.sd.single.geodir-page .featured-area{
   display:none!important
}

Change the default featured image shown on new listings with a constant (add to wp-config.php).

define('SD_DEFAULT_FEATURED_IMAGE', "http://yourdomain.com/images/featured.jpg")

Hide the display of the word “Address” and “Phone” in sidebar but leave the icon in place

.geodir-sidebar-wrap .geodir-i-location,
.geodir-sidebar-wrap .geodir-i-contact { display:none; }

Change Category and Tag links to remove the Location Filter

Links for Categories and Tags on the Detail page will include the location of the listing. For example, the “Restaurant” Category at the top of the page will have a link that includes the location of the listing: https://MyGeodirectory.com/supportdemoalex/places/united-kingdom/northern-ireland/newcastle/restaurants/
Use the following snippet to make the link for Categories and Tags point to the base page like: https://MyGeoDirectory.com/supportdemoalex/places/restaurants/
The following Snippet will remove the filter that adds the location slugs to the URL on any page including Listing pages.

remove_filter('term_link', 'geodir_get_term_link', 10);

Modify breadcrumbs to point to GD Home instead of WP Front Page

function modify_breadcrumb_first_item($html) {
    return '<a href="' . home_url() . '/directory/">' . __( 'Directory', 'geodirectory' ) . '</a>';
}
add_filter('geodir_breadcrumb_first_link', 'modify_breadcrumb_first_item');

Move Detail Page Sidebar Widget Area to the Top of the Sidebar

This snippet will move the entire widget area to the top of the sidebar

remove_action('geodir_detail_sidebar_inside', 'geodir_details_sidebar_widget_area', 20);
add_action('geodir_detail_sidebar_inside', 'geodir_details_sidebar_widget_area', 1);

Display tags on Detail Page

remove_action('geodir_before_detail_page_more_info','sd_tags_content');
add_action('sd_detail_before_cat_links','sd_tags_content');

Use this CSS to show the tags

.sd-detail-info .geodir_more_info { clear: both; }

Author Images and Author Page

Changes for the author image

Changes the default image used on the listing detail page and author page.

define('SD_DEFAULT_FEATURED_IMAGE', 'http://your image url here');

Hide the author image everywhere with CSS

.sd .sd-detail-author {display: none;}

Change every author image on the whole site to be the same

.author-avatar img{
    display:none!important
}
.author-avatar {
    background-image: url(&quot;https://wpgeodirectory.com/support/wp-content/uploads/2017/02/my_custom_author_image.png&quot;);
    background-repeat: no-repeat;
    background-size:  cover;
}

Change the default image by adding a constant to wp-config.php

define('SD_DEFAULT_GRAVATAR_IMAGE', 'http://your image url here');

Change only the default author image by replacing the image file on your server at: supreme-directory/images/gravatar2.png

Buddypress profile image

Display the BuddyPress profile image instead of the member account Gravatar as author image on Detail page
This snippet will switch out the usual display of the author’s gravatar for the image uploaded to the BuddyPress profile. This snippet is specifically for Supreme Directory and will only work with BuddyPress.

add_filter('sd_detail_entry_author','_my_change_sd_avatart_to_bp');
function _my_change_sd_avatart_to_bp($html){
    global $post;
    $author_id = $post->post_author;
    $avatarurl = bp_core_fetch_avatar( array( 'item_id' => $author_id, type => 'full', 'html' => true ) );
    if($avatarurl){$html = $avatarurl;}
    return $html;
}

Change the default author background (featured) image:

define('SD_DEFAULT_FEATURED_IMAGE', 'http://your image url here');

Remove the link on the Author Image to the Author Page

add_filter('geodir_reviewer_content_author_link', '__return_false');

Change the “Contact the Author”link into a “Send Enquiry” link that creates a BuddyPress Private Message.

function bp_custom_get_send_private_message_link($to_id,$subject=false,$message=false) {

	//if user is not logged, do not prepare the link
	if ( !is_user_logged_in() )
	return false;

	$compose_url=bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?';
	if($to_id)
	$compose_url.=('r=' . bp_core_get_username( $to_id ));
	if($subject)
	$compose_url.=('&subject='.$subject);
	if($message)
	$compose_url.=('&content='.$message);

	return wp_nonce_url( $compose_url ) ;
}
add_filter('b_send_inquiry_url', 'b_send_inquiry_url');
function b_send_inquiry_url() {
    global $post;
	$url = bp_custom_get_send_private_message_link($post->post_author);
	return $url;
}

My Account Area – Add links

add_action('sd_my_account_logged_in_extras', 'sd_my_account_logged_in_extras');
function sd_my_account_logged_in_extras() {
   ?>
<ul class="sd-my-account-dd-menu-group sd-my-account-dd-menu-bp-group">
                        <li class="sd-my-account-dd-menu-link">
                            <a href="#">
                                <i class="fa fa-user"></i> Link1
                            </a>
                        </li>
                        <li class="sd-my-account-dd-menu-link">
                            <a href="#">
                                <i class="fa fa-user"></i> Link2
                            </a>
                        </li>
                    </ul>
  <?php
}

My Account Area – Add favorites and listings inside the My Account area

add_action('sd_my_account_logged_in_extras', 'dt_geodir_dashboard_links_custom');
function dt_geodir_dashboard_links_custom() {
	if (!is_user_logged_in()) {
		return;
	}

	$dashboard_link = '';
	$post_types = geodir_get_posttypes('object');

	$user_id = get_current_user_id();
	$author_link = get_author_posts_url($user_id);
	$author_link = geodir_getlink($author_link, array('geodir_dashbord' => 'true'), false);

	$show_listing_link_user_dashboard = get_option('geodir_listing_link_user_dashboard');
	$user_listing = geodir_user_post_listing_count($user_id);
	$my_listings_link = false;

	$show_favorite_link_user_dashboard = get_option('geodir_favorite_link_user_dashboard');
	$user_favourite = geodir_user_favourite_listing_count($user_id);
	$my_favorites_link = false;

	foreach ($post_types as $key => $postobj) {
		if (in_array($key, $show_listing_link_user_dashboard) && array_key_exists($key, $user_listing)) {
			if (!$my_listings_link) {
				$listing_link = geodir_getlink($author_link, array('stype' => $key), false);

				$dashboard_link .= '<li>';
				$dashboard_link .= '<i class="fa fa-user"></i>';
				$dashboard_link .= '<a href="'.$listing_link.'">';
				$dashboard_link .= __('My Listings', 'gdbuddypress');
				$dashboard_link .= '</a>';
				$dashboard_link .= '</li>';

				$my_listings_link = true;
			}
		}
	}

	foreach ($post_types as $key => $postobj) {
		if (in_array($key, $show_favorite_link_user_dashboard) && array_key_exists($key, $user_favourite)) {
			if (!$my_favorites_link) {
				$post_type_link = geodir_getlink($author_link, array('stype' => $key, 'list' => 'favourite'), false);

				$dashboard_link .= '<li>';
				$dashboard_link .= '<i class="fa fa-user"></i>';
				$dashboard_link .= '<a href="'.$post_type_link.'">';
				$dashboard_link .= __('My Favorites', 'gdbuddypress');
				$dashboard_link .= '</a>';
				$dashboard_link .= '</li>';

				$my_favorites_link = true;
			}
		}
	}

	echo $dashboard_link;
}

Advance Search Filters always open

add_filter('sd_search_shortcode_args', 'modify_sd_search_shortcode_args');
function modify_sd_search_shortcode_args($args) {
      if (geodir_is_page('search')) {
         $args['show_adv_search'] = 'always';
	  }
      return $args;
}

Add a wrapper to OEmbeds to enable responsive video

add_filter( 'embed_oembed_html', 'geodir_oembed_filter', 10, 4 ) ;
function geodir_oembed_filter($html, $url, $attr, $post_ID) {
    $return = '<div class="geodir-video-wrapper">'.$html.'</div>';
    return $return;
}

Please log in to rate this.
0 people found this helpful. Permalink


CSS to Unhide the Listing Page Title H1

CSS

body.sd #geodir_content > header.entry-header {
display: block;
}

CSS to Unhide the Footer on the Search and Listings Pages

Supreme search and listings pages show the listings in a scroll area on the left with a fixed height to keep the page from scrolling. This requires hiding the footer. If you want to unhide the footer, you can do it with this CSS, but it may result in a scroll bar on the page.

.sd.search.geodir-page .site-footer, .sd.archive.geodir-page .site-footer {
    display: block!important;
}

Special Content for each Category (Listing) page

Visit your category and add your special content to the “Category Top Description”. Next, visit the listing page for the category and your special content will be displayed at the top of the listings section.

Special Content for each Location (Listing) page

Visit your “Default Location” or GD > Multilocations > Manage Locations and fill in the description of the place. The content will then be displayed at the top of the listings section on the location page.

Set the Hero/Parallax Featured Image for all Listing Pages

All category and location Listing and Archive pages are “Listings” pages, and they all use the same “Posts Page” page template. If you choose to set a featured image for the Listing page, you set that image on the “Posts Page” and then that same featured image will be the same for all categories and location pages.
There are two ways to set the image:
Method 1
– Create a page “123Home” and another called “XYZPosts”
– Visit WP > Settings > Reading > Your Homepage displays
– Set Home page to “123Home”
– Set Posts page to “XYZPosts”
– Go to the “XYZPOsts” page, and edit the page. Set the featured image.
– Done
Method 2
If the Posts page gas no featured image, you can add the following to wp-config.php:

if ( ! defined( 'SD_DEFAULT_FEATURED_IMAGE' ) ) {
    define( 'SD_DEFAULT_FEATURED_IMAGE', "https://MYSITE.com/uploads/2017/11/featured.jpg" );
}

Change Supreme Directory Listing Page Map Properties

In Supreme the listing page sidebar map is rendered via shortcode, so changes made to a widget will have no effect.

Instead you can use customize the following snippet with the shortcode parameters you want. Add following code snippets in your child theme functions.php file OR add it in via any snippet plugin.

function _gd_custom_supreme_listing_map_args( $args = array() ) {
    $args['maptype']                = 'TERRAIN';    // HYBRID, ROADMAP, SATELLITE, TERRAIN
    $args['zoom']                   = 14;           // number between 1 to 19
    $args['autozoom']               = true;         // true or false
    $args['scrollwheel']            = true;         // true or false
    $args['sticky']                 = true;         // true or false
    $args['enable_marker_cluster']  = true;         // true or false

    return $args;
}
add_filter ('geodir_map_options_gd_listing_map', '_gd_custom_supreme_listing_map_args', 10, 1 );

Remove the map from Supreme Listing pages

Remove from all listing pages:

.sd.post-type-archive.geodir-page #geodir_content {
    flex-basis: 100%;
    width: 100% !important;
}
.sd.archive.geodir-page .geodir-listings-sidebar-right {
    display: none;
}

Customize and target listing pages for each CPT by changing the name of the CPT in the CSS below:

.sd.post-type-archive-gd_place.geodir-page #geodir_content {
    flex-basis: 100%;
    width: 100% !important;
}
.sd.archive.geodir-page .geodir-listings-sidebar-right {
    display: none;}

Please log in to rate this.
0 people found this helpful. Permalink


CSS to add text after the home page search bar

CSS

.sd-homepage .geodir-search:after {
    content:"My Custom Text";
    color:#fff!important;
    width: 100%!important;
}

Please log in to rate this.
0 people found this helpful. Permalink


WordPress Pages (not posts, or GD posts, but WordPress Pages) can be made full width with the following CSS:

.sd .container div.entry-content {
    margin:0px!important;
    padding:0px!important;    
}

.page-template-page_full-width .container {
    width: 100%;
    padding:0px!important;
}

Please log in to rate this.
0 people found this helpful. Permalink



Whoop

Normally the Profile tab is the first tab on the GD detail pages, but in the Whoop theme, that is customized to put the Reviews tab first. If you would like to use the GD default settings for the GD Detail page tabs, add this code to your child theme’s functions.php file:

function override_whoop_filters() {
    remove_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend');
}
add_action('init', 'override_whoop_filters');

Please log in to rate this.
1 person found this helpful. Permalink



Geo Travel – Genesis Child Theme

To change the footer text in the Geo Travel – Genesis Child theme, look for the following code in the functions.php file, and adjust as required.

//* Add My Custom Footer Links

Please log in to rate this.
1 person found this helpful. Permalink