Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Location Field no longer showing in member profile / BP Directory

This topic is resolved
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Finn
    Participant
    • 3 Topics
    • 8 Posts
    @paragon

    Hi guys, I can’t see the location field since updating the members search, I’ve tried re-generating default fields to no avail.

    Ps. Great theme, Pleasure to work with so far.

    Regards,
    Finn

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi Finn,

    Thank you very much for the kind words. We’ve put a lot of effort in the making of this theme to let users enjoy the best experience possible. We’re glad that it suits you. ?

    Can you please create us a new user on your website? If possible with admin capabilities so we can make a quick check of your settings.
    You can post the user name and password in your next private reply.

    Cheers,

    Finn
    Participant
    • 3 Topics
    • 8 Posts
    @paragon
    This reply has been marked as private.
    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi Finn,

    By default the theme displays the “Country” and “City” fields in the members directory. I see that you renamed these to “County” and “Town” on your site, which is why they are not displayed anymore.

    However, you can still display them by adding this simple PHP code snippet to your site:

    if ( ! function_exists( 'gwangi_buddypress_member_location' ) ) :
    	/**
    	 * Print the HTML for the Town and County XProfile Field in the BP Member Directory.
    	 *
    	 * @since 1.0.0
    	 */
    	function gwangi_buddypress_member_location() {
    		if ( function_exists( 'xprofile_get_field_data' ) ) :
    			$city         = xprofile_get_field_data( 'Town',    bp_get_member_user_id() );
    			$country      = xprofile_get_field_data( 'County', bp_get_member_user_id() );
    			$allowed_html = array(
    				'a' => array(
    					'href' => array(),
    					'rel'  => array(),
    				),
    			);
    			if ( ! empty( $city ) && ! empty( $country ) ) : ?>
    				<div class="bp-member-xprofile-custom-field bp-member-location"><?php echo wp_kses( $city, $allowed_html ); ?>, <?php echo wp_kses( $country, $allowed_html ); ?></div>
    				<?php
    			endif;
    		endif;
    	}
    endif;

    To add a custom PHP code snippet to your site, we recommend that you use the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). For more info, we invite you to take a look at this article of our documentation:

    Adding Custom PHP Without Changing Your Child Theme

    Best regards,

    Finn
    Participant
    • 3 Topics
    • 8 Posts
    @paragon

    Don’t Panic

    The code snippet you are trying to save produced a fatal error on line 1:
    syntax error, unexpected ‘&’

    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.

    ….

    Finn
    Participant
    • 3 Topics
    • 8 Posts
    @paragon

    Feel free to try yourself. I appreciate you writing code for this. Your a diamond.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Thank you, we really appreciate your kind words. We always try to provide a solution whenever we can and if a code snippet can solve the problem then we’ll be glad to provide it.

    I added the code snippet to your site and it looks like it is working now 🙂

    Best regards,

    Finn
    Participant
    • 3 Topics
    • 8 Posts
    @paragon

    Amazing. Thank you so much dude.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    You’re welcome 🙂

    Best regards,

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Location Field no longer showing in member profile / BP Directory’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site