Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP Profile Search – don't show members directory


  • nylarosie
    Participant

    @nylarosie

    Hi…I’m using BP profile search and it works fine. However the results give two columns (all member and ‘my friends’) the first of which allows you to:

    – See how many members there are (written on the tab), and
    – See who these are by clicking on the tab.

    I don’t want members to see the full list of other members – just their filtered search results.

    Is there any way that I can achieve this?

    Thank you very much indeed!

    Nyla

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

  • shanebp
    Moderator

    @shanebp

    Do you have a /members page?
    Is that where you put the BP profile search shortcode?

    If yes and yes, then

    > However the results give two columns

    By columns, you mean tabs.
    afaik, they are standard to the /members page.

    If you don’t want a /members page but you do want a profile search results page, you’ll need to know how to rewrite part of the plugin. Or ask the plugin author.

    You can remove the “All Members” tab, but that may have negative consequences as it is the default tab and may trigger the bp_has_members( bp_ajax_querystring( ‘members’ ) ) call.


    nylarosie
    Participant

    @nylarosie

    Hi Shane, thanks for your reply. I don’t have the members page visible as I don’t want all the members to see it. The shortcode is in its own page but clearly calls up the members directory. This is then triggered to in the results.
    You are right there are two tabs – one has the full directory accessibility.

    I have written to the plugin developer. Is there anything that you ( or anyone) could suggest? I still want to be able to search the entire directory and display ( just the) results…

    Thank you again! Nyla


    nylarosie
    Participant

    @nylarosie

    Hi all,

    Anyone got any ideas as to how I can prevent showing the full members directory, whilst still enabling profile search to search the directory and deliver results?

    Thank you again – Nyla


    shanebp
    Moderator

    @shanebp

    In your-theme/members/index.php

    find and delete this div:

    `div class=”item-list-tabs” role=”navigation”`

    And please don’t double post.


    nylarosie
    Participant

    @nylarosie

    Sorry about double posting. I am very new but no excuse!

    Will try your suggestion a bit later.

    Thank you again…Nyla


    nylarosie
    Participant

    @nylarosie

    Hi…has removed the tabs and still delivers the results.

    However still has links to ‘all members’ and ‘my friends’ on the left of the screen (lonks via the words themselves in the margin) any ideas? Have a feeling its to do with this:

    • <a href="”><?php printf( __( 'All Members %s’, ‘buddypress’ ), bp_get_total_member_count() ); ?>
    • <a href="”><?php printf( __( 'My Friends %s’, ‘buddypress’ ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>

    Thanks…Nyla


    nylarosie
    Participant

    @nylarosie

    sorry…did not remove the whole div…!

    Think it is resolved…testing..nyla


    nylarosie
    Participant

    @nylarosie

    Shanebpx…Thank you, it worked.

    You have inspired me to delve a bit deeper into php!

    Nyla


    Sowulo
    Participant

    @sowulo

    Proposed solution solves the issue partly. Delete div class=”item-list-tabs” role=”navigation”in your-theme/members/index.php lead to reflection of request which works right. But if you clear filter fields or refresh the page then the full list of members is appear.

    Appreciate if somebody can help to fix the issues above and hide the full list reflecting only results by search.

    Thank you in advance,
    Anton

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘BP Profile Search – don't show members directory’ is closed to new replies.
Skip to toolbar