BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 71

    Hello Brajesh,

    Thank you for your reply. I don’t want to bother you with this minor issue. Please do let me know when you will push an update 🙂

    Kind Regards,
    Lefteris

  • Participant
    Level: Enlightened
    Posts: 71

    Hello Brajesh,

    One more question about the slider shortcode of feautered members 🙂 Could i also use the parameter enable_type='1' to short the members by the newest registered first on the slider?

    Kind Regards,
    Lefteris

  • Participant
    Level: Enlightened
    Posts: 71

    Hello Brajesh,

    Thank you for your reply and your patience 🙂

    You don’t need to check my second question.I got to display the categories correct.

    I am just trying to register this nav_tab only for specific roles.I have tried to use your code example here https://buddydev.com/support/forums/topic/profile-tabs-depending-to-user-role-or-member-type/#post-11773 but is not working exactly as it should.

    Please let me know when you have a check.

    Best Regards,
    Lefteris

  • Participant
    Level: Enlightened
    Posts: 71

    Hello Brajesh,

    I have tried to use your code example here https://buddydev.com/support/forums/topic/profile-tabs-depending-to-user-role-or-member-type/#post-11773 but still it doesn’t work 100% as it should.
    It removes the nav_item from all the users that are not for example with role ‘subscribers’ but if the current login user is an ‘author’ (and he should be able to access his own events custom nav_item) and he is on the screen of a subscriber the nav_item is getting removed for him.

    *Basically my theme has a profile menu as a dropdown in the users screen top right corner and i can see that the nav_item is getting removed.

    Thank you for any help.

    Best Regards,
    Lefteris

  • Participant
    Level: Enlightened
    Posts: 71

    Hello Brajesh,

    Thank you very much for your reply 🙂
    I have managed to create a nav_item and set a custom post type loop displaying my events in it.
    Here is my code. https://pastebin.com/xYCV5HzB (Please could you check it and let me know if i did any mistake?)

    However i am trying to fix 2 issues:
    1. i am having difficulties to set this nav_item only for specific user roles.
    This means that only specific roles will have this custom nav_item on the public members page and on their profile.(For example only Editors,Administrators and Producers)
    Somethink like

    $allowed_roles = array('editor', 'administrator', 'author');
    if( array_intersect($allowed_roles, $user->roles ) ) { 

    2. In the post loop i am trying to display the categories that are assigned to the custom post. (Also maybe set a better code format instead of all those echo)

    I would appreciate any help.

    Best Regards,
    Lefteris

  • Participant
    Level: Enlightened
    Posts: 71

    Hello Brajesh,

    Thank you for your response. It had worked perfectly.
    I would like to ask you another issue that i am facing.

    I would like to create a tab (nav_item) in every users profile that can display the custom post type of some events that are assigned to the user.
    Your plugin https://buddydev.com/plugins/buddyblog/ can do that just fine, but i don’t need all this extra code for creating,editing,deleting posts. Only the display part. Is there a way i could use specific part of your code for this?

    old conversation here https://buddypress.org/support/topic/resolved-show-posts-written-by-user-on-profile/

    I would also need to manipulate the code a bit so that the tab is being created only for specific user roles (for example only for Editors).

    Forgive me if i am creating a new topic inside another topic. I can create a new topic if needed.

    Kind Regards,
    Lefteris

  • Participant
    Level: Enlightened
    Posts: 71

    Hello Brajesh,

    Thank you very much for your kind help.
    Please let me know with the update.

    Kind Regards,
    Lefteris

  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on in reply to: [Resolved] Who’s Online widget adjustment #45023

    OMG , thank you Brajesh :))

  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on in reply to: [Resolved] Who’s Online widget adjustment #45011

    Hello Brajesh,

    Thank you for your response.
    I was speaking about filtering the title of the Who’s Online Buddypress widget and i’ve noticed that it’s offering a ‘widget_title’ filter. My code is filtering the title but for some reason it affects also some other widgets.

  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on in reply to: [Resolved] Who’s Online widget adjustment #45005

    Hello Brajesh,

    Thank you so much for your help.
    It works correct now.

    One last question.

    I need to filter the title of the widget but it seems that i am doing something wrong with my code

    add_filter( 'widget_title','enostalgia_show_online_members_only_widget_title', 10, 3 );
    function show_online_members_only_widget_title( $title, $settings, $id_base ) {
    
        if ( 'Ποιος είναι συνδεδεμένος' == $title ) 
        return '<p class="notranslate stay-in-touch" style="color: #b8860b;">WHO IS ONLINE IN OUR FORUM</p>';
    }

    because it removes titles from other widgets also.