Forum Replies Created
-
AuthorPosts
-
JossParticipant@joss
- 34 Topics
- 85 Posts
Hi,
I seemed to have answered this conversation…Look at the reply of PMP Pro support :
—
“Hello. Since I’m unfamiliar with the theme specifics, I can give an overview on how to access a users membership level, and level description. Your theme developer should be able to then assist with having it actually display in their theme.First, we need to get the members membership level. This can be done using the function pmpro_getMembershipLevelForUser():
https://github.com/strangerstudios/paid-memberships-pro/blob/dev/includes/functions.php#L1693
$level = pmpro_getMembershipLevelForUser();
The $level is a PHP object and contains the necessary information. You can access the level name as $level->name and the description is $level->description.”
—Can you make me this code snippet now ?
Thanks,
JossFebruary 26, 2019 at 21:33 #5592JossParticipant@joss- 34 Topics
- 85 Posts
It works !!
FOR OTHER USER :
I make a .pot and .mo with Poedit on my computer, it’s free software.
After I place files in wp-content/languages/plugins, then with Loco Translate in WordPress I went to the BP Profile Search folder and I copied strings in my personnal folder (because if you don’t do this, when there is an updtae of the plugin, your translation is deleted), and after this I translate easly the plugin…Good luck !
February 26, 2019 at 10:28 #5564JossParticipant@joss- 34 Topics
- 85 Posts
Hi,
If I make my member type directory page in full width, how can I display your search icon on desktop ?
I want to display it because I have 2 members types in 2 differents BP member directory with 2 differents search forms, and when your icon is displaying, when your icon is displayed, it takes into account the display button in the directory via the configuration of the search form and only that form, you understand ?
February 26, 2019 at 09:18 #5550JossParticipant@joss- 34 Topics
- 85 Posts
Why when I put yes, it does not directly display the directory search box, it displays only on mobile via your icon. It would be cool to be able to display it without having to go through the sidebar, it’s already happening like that on mobile, why not on desktop …?
February 25, 2019 at 17:31 #5528JossParticipant@joss- 34 Topics
- 85 Posts
Hi,
I understand.
Look at the screenshot.
Your BP search form doesn’t display on Member Type Directory generated by Member Type Pro.
If you don’t want to do something to help me, can you please tell me where can I found this feature in your theme / page / template.php ?
Thanks,
JossFebruary 25, 2019 at 12:07 #5507JossParticipant@joss- 34 Topics
- 85 Posts
Hi,
It’s YOUR code snippet !!
You don’t want to modify it ?
Yet I’m sure you have the skills to do that…
add_action( 'gwangi_buddypress_member_xprofile_custom_fields', 'gwangi_buddypress_member_type', 10 ); function gwangi_buddypress_member_type() { if ( bp_is_user() ) { $user_id = bp_get_displayed_user()->id; } else { $user_id = bp_get_member_user_id(); } $member_type_name = bp_get_member_type( $user_id ); $member_type = bp_get_member_type_object( $member_type_name ); ?> <div class="bp-member-xprofile-custom-field bp-member-type"><?php echo $member_type->labels['singular_name']; ?></div> <?php } if ( ! function_exists( 'gwangi_bp_xprofile_location_member_location' ) ) : /** * Print the HTML for BP xProfile Location Field in the BP Member Directory. * * @since 1.1.9 */ function gwangi_bp_xprofile_location_member_location() { if ( function_exists( 'xprofile_get_field_data' ) ) : $location = xprofile_get_field_data( 'Location', bp_get_member_user_id() ); $allowed_html = array( 'a' => array( 'href' => array(), 'rel' => array(), ), ); if ( ! empty( $location ) ) : ?> <div class="bp-member-xprofile-custom-field bp-member-location"><?php echo wp_kses( $location, $allowed_html ); ?></div> <?php endif; endif; } endif;
February 21, 2019 at 14:36 #5435 -
AuthorPosts