Giri
Forum Replies Created
-
AuthorPosts
-
August 8, 2017 at 8:22 am in reply to: Supreme Theme – Listing Gravitar pic should be an uploaded pic instead #390239
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
You are welcome.
Hi can you give me the direct link to the listing page where i can see those rating icons?
Thanks
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; }
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
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; }
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; }
You are welcome.
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
August 7, 2017 at 11:54 am in reply to: Get rid of the paralax header for some pages in Supreme #390079Hi 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
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
This topic might help you.
https://buddypress.org/support/topic/allowing-new-users-to-select-wp-role/
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
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; }
You are welcome.
-
AuthorPosts