Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Website Setup › Pages › Swipe cards display and taxonomies
- This topic has 20 replies, 3 voices, and was last updated 6 years, 3 months ago by
Themosaurus.
-
AuthorPosts
-
alexParticipant@abourne
- 81 Topics
- 259 Posts
On members swap, how to make the buttons be circles like demo, not square? Reference http://www.gymn.com.au
Underneath buttons, on each card, how do we customise which taxonomies to display on the card? At present, none are displaying on mine, but I see by the demo that the city and age are appearing.
October 8, 2018 at 08:56 #2688alexParticipant@abourne- 81 Topics
- 259 Posts
Additionally, how do we change the tile of items and customise shapes/sizes? Maybe so that the UI of cards is not angled, perhaps having the image be full screen instead of being cut in half… etc. Are there any cusotmiser options?
October 8, 2018 at 09:10 #2693alexParticipant@abourne- 81 Topics
- 259 Posts
1. On members swap, how to make the buttons be circles like Youth Gwangi demo, not square like on mine? Reference http://www.gymn.com.au. Strangely, the buttons only appear on Chrome and not firefox… why?
2. Underneath buttons, on each card, how do we customise which profile attributes to display on the card? At present, none are displaying on mine, but I see by the on gwangi demos that the city and age are appearing. It must be pulling from the base group settings according to the user registration fields which is generating this data.
3. Additionally, how do we change the tile of items and customise shapes/sizes? Maybe so that the image in cards are not on an angled, perhaps having the image be full screen instead of being cut in half… etc. Are there any cusotmiser options? Such as how it is on other gwangi themes, the image being a horizontal line, not an angled diagonal line.
October 16, 2018 at 19:47 #2902@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
1. The buttons are only displayed for connected people. That’s why they are not visible on your screenshot. The style of the “community” action buttons can be modified via the WordPress Customizer (BuddyPress Panel > Members Tab).
2. By default the theme only displays fields that are dynamically generated (Birthdate, country and city). Can you describe what field do you want to appear below the member avatar ? This will allow us to help you display them.
3. Yon can remove the angled effect for cards with a CSS snippet.
Can you please create a new website user for us? If possible with administrator capabilities so we can create this snippet directly on your site ?
You can post the user name and password in your next private reply.Thank for your reply.
Cheers,
October 17, 2018 at 11:27 #2954@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
2. The specific fields that you have probably created are not printed in any pages by Gwangi. To change this and display their values under the member avatar, please add the following code snippet to your website:
if ( ! function_exists( 'gwangi_buddypress_member_location' ) ) : /** * Print the HTML for the BP xProfile Location field. * * @since 1.0.0 */ function gwangi_buddypress_member_location() { if ( function_exists( 'xprofile_get_field_data' ) ) : $location = xprofile_get_field_data( 'Location', bp_get_member_user_id() ); // Please make sure 'Gym' is the correct name for your custom field, minding the case for each letter. $gym = xprofile_get_field_data( 'Gym', bp_get_member_user_id() ); $allowed_html = array( 'a' => array( 'href' => array(), 'rel' => array(), ), ); // Display the Location value first and then, the Gym value. if ( ! empty( $location ) ) : ?> <div class="bp-member-xprofile-custom-field bp-member-location"><?php echo wp_kses( $location, $allowed_html ); ?></div> <?php endif; if ( ! empty( $gym ) ) : ?> <div class="bp-member-xprofile-custom-field bp-member-gym"><?php echo wp_kses( $gym, $allowed_html ); ?></div> <?php endif; // Display the Location and Gym values side by side. Please remove if not necessary. if ( ! empty( $location ) || ! empty( $gym ) ) : ?> <div class="bp-member-xprofile-custom-field"><?php echo wp_kses( $location, $allowed_html ); ?> - <?php echo wp_kses( $gym, $allowed_html ); ?></div> <?php endif; endif; } endif;
To add this code snippet to your site, we recommend that you use Code Snippets.
3. To remove the angles from the member avatars, please navigate to “Appearance > Customize > Additional CSS” in your admin panel and copy/paste in the following CSS code snippet:
/* Remove angled effect from cards */ .card-body { padding-top: 20px !important; } .card-body:before, .card-body:after { content: none !important; }
We hope this will solve your issues. ?
Regards,
November 1, 2018 at 18:06 #3198alexParticipant@abourne- 81 Topics
- 259 Posts
Thanks for taking the time to help me on this request.
I added the first snippet. Came back with error:
Don’t Panic
The code snippet you are trying to save produced a fatal error on line 34:syntax error, unexpected ‘||’ (T_BOOLEAN_OR)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
Any suggestions?
November 1, 2018 at 20:43 #3211@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
We’re really sorry because the first snippet had a typo. We have corrected it. Can you test it again?
if ( ! function_exists( 'gwangi_buddypress_member_location' ) ) : /** * Print the HTML for the BP xProfile Location field. * * @since 1.0.0 */ function gwangi_buddypress_member_location() { if ( function_exists( 'xprofile_get_field_data' ) ) : $location = xprofile_get_field_data( 'Location', bp_get_member_user_id() ); // Please make sure 'Gym' is the correct name for your custom field, minding the case for each letter. $gym = xprofile_get_field_data( 'Gym', bp_get_member_user_id() ); $allowed_html = array( 'a' => array( 'href' => array(), 'rel' => array(), ), ); // Display the Location value first and then, the Gym value. if ( ! empty( $location ) ) : ?> <div class="bp-member-xprofile-custom-field bp-member-location"><?php echo wp_kses( $location, $allowed_html ); ?></div> <?php endif; if ( ! empty( $gym ) ) : ?> <div class="bp-member-xprofile-custom-field bp-member-gym"><?php echo wp_kses( $gym, $allowed_html ); ?></div> <?php endif; // Display the Location and Gym values side by side. Please remove if not necessary. if ( ! empty( $location ) || ! empty( $gym ) ) : ?> <div class="bp-member-xprofile-custom-field"><?php echo wp_kses( $location, $allowed_html ); ?> - <?php echo wp_kses( $gym, $allowed_html ); ?></div> <?php endif; endif; } endif;
Thank you in advance.
Regards,
November 2, 2018 at 11:37 #3228alexParticipant@abourne- 81 Topics
- 259 Posts
Per the issue with xprofile location in other thread, I am unable to properly test if the snippet works, presuming that the snippet would not work without the ‘location’ field to pull from…
Find attached.
In any case, the ‘gym’ field itself does not display on member cards.
As for location field, cannot know until having the conflict fixed.
Back to you…
November 3, 2018 at 11:13 #3248@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
When we visited your dashboard earlier today, we’ve noticed that you have registered several code snippets conflicting with each other. (Please review attachment from following private reply.)
As a matter of fact, you’re currently displaying Location and Gym with a first snippet and overriding it to display only the Location value. As Location values are not displayed currently on your website as stated in another issue, Gym values aren’t either in this case.
We suggest that you disable some of your snippet, only the keeping the most relevant for your project.
Regards,
November 6, 2018 at 11:24 #3327@themosaurus- 1 Topics
- 1675 Posts
This reply has been marked as private.November 6, 2018 at 11:25 #3329alexParticipant@abourne- 81 Topics
- 259 Posts
Thanks for sharing this. Apologies for laggard response.
I tried deactivating the mentioned snippets.
It did not change the fact that Gym/location fields do not display..
Is there anything else we can try?
Ideally: name + gym + location for the tile field displays
November 18, 2018 at 01:22 #3620alexParticipant@abourne- 81 Topics
- 259 Posts
Using the full snippet provides two of the gym label side by side.
When removing the last part:
// Display the Location and Gym values side by side. Please remove if not necessary. if ( ! empty( $location ) || ! empty( $gym ) ) : ?> <div class="bp-member-xprofile-custom-field"><?php echo wp_kses( $location, $allowed_html ); ?> - <?php echo wp_kses( $gym, $allowed_html ); ?></div> <?php endif;
It only dispalys the gym field.
No location at all….
No other snippets double up here either.If it is helpful to know, I have these deactivated, and alone do not do anything when activated in isolation:
if ( ! function_exists( 'gwangi_buddypress_member_location' ) ) : /** * Print the HTML for the BP xProfile Location field. * * @since 1.0.0 */ function gwangi_buddypress_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;
if ( ! function_exists( 'gwangi_buddypress_member_location' ) ) : /** * Print the HTML for the BP xProfile Location field. * * @since 1.0.0 */ function gwangi_buddypress_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;
Appreciate any solutions
November 18, 2018 at 06:49 #3622@themosaurus- 1 Topics
- 1675 Posts
Hi @aboure,
On your website, it seems that you’ve changed the
Location
field name toLocation I train at is
. We’ve edited the previously posted snippet and it works fine now. ?Please check and tell us if it’s OK for you.
Yours,
November 20, 2018 at 17:24 #3673@themosaurus- 1 Topics
- 1675 Posts
November 20, 2018 at 17:25 #3675BENParticipant@benbusiness- 6 Topics
- 15 Posts
@themosaurus, Please I need you to assist me get mine working too.
I am using Bp xprofile location and I need to display locations and other custom fields too.
2. Also check my login with ajax short code. It doesn’t work
Thanks in advance.
November 23, 2018 at 08:56 #3740@themosaurus- 1 Topics
- 1675 Posts
November 23, 2018 at 18:00 #3755@themosaurus- 1 Topics
- 1675 Posts
Hi @abourne,
We’re not sure if that’s possible as this data is coming straight from BP XProfile Location and not from theme. So, it’s best if you ask the plugin developer directly:
https://wordpress.org/support/plugin/bp-xprofile-locationRegards,
November 23, 2018 at 18:02 #3760 -
AuthorPosts
The topic ‘Swipe cards display and taxonomies’ is closed to new replies.