Giri

Forum Replies Created

Viewing 15 posts - 211 through 225 (of 2,661 total)
  • Author
    Posts

  • Giri
    Expired Member
    Post count: 3155

    Hi try this code.

    Replace custom_field_key with your real custom field key.

    
    
    add_filter('sd_detail_entry_author', 'modify_sd_detail_entry_author');
    function modify_sd_detail_entry_author($entry_author) {
    	global $post;
    	if (isset($post->custom_field_key) && !empty($post->custom_field_key)) {
    		$entry_author = '<img src="'.$post->custom_field_key .'"  height="100" width="100">';	
    	}
    	return $entry_author;
    }

    Let me know how that goes.

    Thanks

    in reply to: My Account in Supreme Directory #390232

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

    in reply to: Custom Rating Icon #390225

    Giri
    Expired Member
    Post count: 3155

    Hi can you give me the direct link to the listing page where i can see those rating icons?

    Thanks

    in reply to: My Account in Supreme Directory #390156

    Giri
    Expired Member
    Post count: 3155

    Hi Roman,

    The above snippets and current snippet I provided is specifically created for you and that takes time.

    Please consider renewing your membership if you are planning to seek our help in the future.

    Thanks

    
    
    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;
    }
    in reply to: List Manager won't activate #390137

    Giri
    Expired Member
    Post count: 3155

    Hi John,

    BuddyPress is Optional.

    Just make sure you have Posts 2 Posts plugin installed and activated before activating Lists manager.

    If you still have problem, please post your admin details. I’ll take a look.

    Thanks

    in reply to: My Account in Supreme Directory #390118

    Giri
    Expired Member
    Post count: 3155

    Try this code.

    
    
    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;
    }
    in reply to: My Account in Supreme Directory #390103

    Giri
    Expired Member
    Post count: 3155

    Hopefully you are using buddypress.

    If thats the case try this code.

    
    
    add_filter('geodir_dashboard_links', 'dt_geodir_dashboard_links_custom');
    function dt_geodir_dashboard_links_custom($dashboard_link) {
    	if ( class_exists( 'BuddyPress' ) ) {
    		$user_link = bp_get_loggedin_user_link();
    		$dashboard_link .= '<li>';
    		$dashboard_link .= '<i class="fa fa-user"></i>';
    		$dashboard_link .= '<a href="'.$user_link.'listings/'.'">';
    		$dashboard_link .= __('My Listings', 'gdbuddypress');
    		$dashboard_link .= '</a>';
    		$dashboard_link .= '</li>';
    
    		$dashboard_link .= '<li>';
    		$dashboard_link .= '<i class="fa fa-cog"></i>';
    		$dashboard_link .= '<a href="'.$user_link.'favorites/'.'">';
    		$dashboard_link .= __('My Favorites', 'gdbuddypress');
    		$dashboard_link .= '</a>';
    		$dashboard_link .= '</li>';
    	}
    	return $dashboard_link;
    }
    in reply to: Recent review widget not limiting number of reviews #390095

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

    in reply to: Recent review widget not limiting number of reviews #390087

    Giri
    Expired Member
    Post count: 3155

    Hi Marc,

    Fixed that bug in our code and applied the patch in your website via ftp.

    Let me know if you still have problem.

    Thanks

    in reply to: Get rid of the paralax header for some pages in Supreme #390079

    Giri
    Expired Member
    Post count: 3155

    Hi mb,

    Here is the snippet I added for UsersWP compatibility. The following code hides the supreme banners in UsersWP pages.

    
    
    add_filter('get_post_metadata', 'sd_hide_banner_on_uwp_pages', 10, 4);
    function sd_hide_banner_on_uwp_pages($metadata, $object_id, $meta_key, $single) {
        if (defined('USERSWP_VERSION') && is_uwp_page()) {
            if ($meta_key == 'sd_remove_head' && $single) {
                $metadata = "1";
            }
        }
        return $metadata;
    }

    You can replace the UsersWP if check with this code.

    
    
    global $post_type;
    $post_types = geodir_get_posttypes();
    if(!in_array($post_type, $post_types)) 

    That would hide the banner in all other pages except gd detail pages.

    Hope that helps.

    Let me know if you can’t make that work.

    Thanks

    in reply to: UsersWP soft launch – Feedback Wanted #389744

    Giri
    Expired Member
    Post count: 3155

    Hey George, Social login is our free addon. So you can download directly in this page without membership.

    https://userswp.io/downloads/social-login/

    Thanks

    in reply to: Mixing Memberships #389741

    Giri
    Expired Member
    Post count: 3155
    in reply to: Mixing Memberships #389740

    Giri
    Expired Member
    Post count: 3155

    Hi Kerry,

    As far as I know both Geodirectory and BuddyPress do not have any separate user role. Both plugins uses wordpress default user role while registering user.

    Let me know if i’m missing something.

    Thanks

    in reply to: Moving the logout link #389731

    Giri
    Expired Member
    Post count: 3155

    You need to use css to hide the logout link and then use this snippet to add a logout link in the bottom.

    
    
    add_filter('geodir_dashboard_links', 'custom_geodir_dashboard_links');
    function custom_geodir_dashboard_links($dashboard_link) {
    	
    	$logout_link = wp_logout_url( home_url() );
    	$dashboard_link .= '<li>';
    	$dashboard_link .= '<i class="fa fa-user"></i>';
    	$dashboard_link .= '<a href="'.$logout_link.'">';
    	$dashboard_link .= __( 'Logout', 'geodirectory' );
    	$dashboard_link .= '</a>';
    	$dashboard_link .= '</li>';
    
    	
    	return $dashboard_link;
    }
    in reply to: Change hero/featured image on Supreme Author Page #389633

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

Viewing 15 posts - 211 through 225 (of 2,661 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount