Hi @pwizard
WordPress by default does not have the profile pages, have the author pages (and they are only available if your theme support them)
If you are using the BuddyPress/BuddyBoss plugins to handle frontend profiles, then there is a code snippet to replace those links to the BuddyPress/BuddyBoss ones:
https://gamipress.com/snippets/buddypress-integration/buddypress-profile-link-on-earners-list/
Hope this helps!
Ruben
I mentioned on another post here that we use WPSymposium Pro which is a BuddyPress clone, and you don’t support it.
Do you know of that code is only one thing needs to be changed such as “bp_core_get_user_domain” to get it to work with WPS?
It is similar in that is uses a Profile page.
Thanks
Hi @pwizard
I’m sorry but you may need to contact to this plugin author to meet the function to get the user profile URL
Best regards
Ruben
They tell me the same thing to contact author of gamipress. Anyway, I got it to work almost as is, just changing bp_core part to “wps_profile_link”.
return '<li><a href="' . wps_profile_link( $user_id ) . '">' . user_avatar( $user_id ) . '</a></li>';
It shows the Avatar and it clicks through to the Profile page. But the USER’s name does not appear below the Avatar. Is that the same way it works with the bbpress code?
If not, can you tell me how to change the 2nd line to include the person’s name in the href link? (assuming it is “wps_name” for example.) I can figure out the call for the name, but don’t know how to program it with commas and quotation marks.
I appreciate it.
Vincent
-
This reply was modified 5 years, 1 month ago by
pwizard.
Hi @pwizard
I am so sorry but we do not offer support for customizations like that since our main focus is the development and maintenance of GamiPress, AutomatorWP and all official add-ons.
Anyway, any WordPress custom development agency or freelance can handle it for you.
If you do not know one, we recommend checking our list of trusted experts that can estimate any type of job for you here:
https://gamipress.com/customizations/
Best regards
What you CAN tell me is this:
Does the BUDDYPRESS function code show the avatar AND the user’s name below the Avatar (like your default method)…but all links to the buddypress profile page? I don’t know much coding but looking that this it appears is does NOT show the user’s name.
Then I will know that if it doesn’t then the buddypress solution is not a complete solution and that I already have your function working as you intended it not expecting anything more from it.
-
This reply was modified 5 years, 1 month ago by
pwizard.
Hi @pwizard
That’s the default code in GamiPress to render an achievement or rank earners:
$user = get_userdata( $user_id );
$user_url = get_author_posts_url( $user->ID );
return '<li>'
. '<a href="' . $user_url . '">'
. get_avatar( $user->ID )
. '<span class="earner-display-name">' . $user->display_name . '</span>'
. '</a>'
. '</li>';
The BuddyPress code snippet does not shows the user display name, but I just updated it to match with the GamiPress output
Note: Code snippets are code example for developers to customize or extend GamiPress, but at any time we will provide support about any custom development
Best regards
-
This reply was modified 5 years, 1 month ago by
Ruben Garcia.
-
This reply was modified 5 years, 1 month ago by
Ruben Garcia.
Thank you Ruben. It works perfeftly now for WPSymposium with that one simple change (wps_profile_link). Appreciate the help.
function my_prefix_disable_buddypress_link_on_earners_list( $output, $user_id, $post_id, $args ) {
$user = get_userdata( $user_id );
return '<li><a href="' . wps_profile_link( $user_id ) . '">' . get_avatar( $user_id ) . $user->display_name . '</a></li>';
}
// Customize link on achievement earners list
add_filter( 'gamipress_get_achievement_earners_list_user', 'my_prefix_disable_buddypress_link_on_earners_list', 10, 4 );
// Customize link on rank earners list
add_filter( 'gamipress_get_rank_earners_list_user', 'my_prefix_disable_buddypress_link_on_earners_list', 10, 4 );