Supreme Directory Theme FAQs

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:

function dt_remove_default_footer() {
    remove_action( 'dt_footer_copyright', 'dt_footer_copyright_default', 10 );
    add_action( 'dt_footer_copyright', 'custom_dt_footer_copyright_text', 10 );
}
add_action('init', 'dt_remove_default_footer');

function custom_dt_footer_copyright_text(){
    echo 'My copyright text';
}

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


Category: Directory Starter Theme, Supreme Directory Theme

← FAQs

Please log in to rate this.
12 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.
2 people found this helpful.


Category: Supreme Directory Theme

← FAQs

Please log in to rate this.
2 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.
0 people found this helpful.


Category: Supreme Directory Theme

← FAQs

Please log in to rate this.
0 people 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.


Category: Supreme Directory Theme

← FAQs

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.


Category: Supreme Directory Theme

← FAQs

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


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 } ?>

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


Category: Supreme Directory Theme

← FAQs

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" );
}

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


Category: Supreme Directory Theme

← FAQs

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.


Category: Supreme Directory Theme

← FAQs

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