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

In regards to the COVID-19 situation

Your support team is currently doing their best to offer the best support possible despite the current COVID-19 situation. However during these exceptional circumstances, please note that you should expect a response time of 2-3 business days, until further notice.Rest assured that we will still do our best to handle your requests as soon as possible! Everyone stay safe and healthy! 😷

If the logged-in user is a male or a female.

This topic is resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Carsten
    Participant
    • 8 Topics
    • 39 Posts
    @privatedanish

    Hi support.

    This code finds out, if the logged-in user is a male or a female.
    The problem is, that it doesn’t work in the widget area. Like who’s online, recently active members, NEWEST – ACTIVE – POPULAR…….etc

    So I was wondering, if there is anyone, who knows how to modify or change this code, so i works everywhere?

    Here is the snippert——>

    add_filter (‘bp_ajax_querystring’, ‘modify_members_loop’, 20, 2);
    function modify_members_loop ($qs=false, $object=false)
    {
    global $wpdb;
    if ($object != ‘members’) return $qs;

    // figure out if the logged-in user is male or female
    $gender = xprofile_get_field_data (3, bp_loggedin_user_id ());

    if ($gender == ‘Male’)
    $query = “SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 3 AND value = ‘Female'”;
    else
    $query = “SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 3 AND value = ‘Male'”;

    $custom_ids = $wpdb->get_col ($query);

    $args = wp_parse_args ($qs);
    $args[‘include’] = implode (‘,’, $custom_ids);
    $qs = build_query ($args);

    return $qs;
    }

    Best regards Carsten.

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 1895 Posts
    @themosaurusrex

    Hi @privatedanish,

    We think that this feature requires custom development work.
    For one, we recommend you try to reach MeshPros and request a customization quote:

    Request a Quote

    These guys are the author of Match me for BuddyPress, a plugin that recommended to provide the matchmaking feature to your website. You might be already using it. They’ve quite a lot of experience with WordPress and BuddyPress development and might be better suited to help you.

    If you’re on a tight budget, we recommend you to require the services from Envato Studio freelancers (https://studio.envato.com/explore/websites-programming). This web platform gives you access to developers who have already experience with theme customizations, and for very competitive prices.

    Best,

    Carsten
    Participant
    • 8 Topics
    • 39 Posts
    @privatedanish

    Hi Support.

    Thanks for the info and yes, I could pay to make that happen, but I rather not. 😉 But you promote this theme as a Dating theme and as far as I know. A dating site is where you meet and date the opposite sex. The above snippet, works in the (members/-directory). But I found out, that there is another directory, the (members-list) The BuddyPress widgets and the members-list page, is associated with this members-list and somehow, it’s also related to the Paid membership pro plugin, that uses this members-list to sort members! I’m not an expert in coding. But maybe someone you know, knows how to implant or edit this snippet, so it work everywhere?

    NOTE: If you sign up as a member and do not log in, at least one time, you will be registered in the members-list. But as soon as you have logged in ones, then you will be moved and registered in the members-directory! So now the member, is registered in 2 lists…Why

    Best regards Carsten. 🙂

    Olivier
    Keymaster
    Themosaurus Support
    • 0 Topics
    • 1895 Posts
    @themosaurusrex

    Hi @privatedanish,

    I see your point. However, please note that for various reasons, Gwangi is not advertised as a dating-only theme anymore. (Please see attached.)
    It’s totally possible that features might be missing to make it exactly as you view your ideal dating website. The best way to make it tick the way that you wish is to require customization or custom development work.

    Also, please note that the Members Lists page is a widgetized page that can be edited from the Customizer. You can remove it if you wish to display only one directory. Otherwise, you can also choose to edit the Grimlock for Author Avatars widget to query different members. The settings are nearly the same as the other Grimlock section widgets. However, you can also query for users and display the results on your homepage.

    This widget is best used in the Customizer as it allow you to preview your changes. To edit your widgets in the Customizer, please navigate to “Customize > Widgets”.
    For more on a very similar topic, please read the following post:

    How to Add the Meet Our Active Members Widget ?

    Best,

Roboraptor 🦖
Themosaurus Topic Closer

Hi there,

This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!

Best regards,
The Themosaurus team.

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

The topic ‘If the logged-in user is a male or a female.’ 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 ❤️