Get 15% off on all our plugins, themes and memberships till 4th December. Use coupon: BLACKFRIDAY2021.

BuddyDev

Search

Make Custom Profile Tab specific to specific Profile?

  • Participant
    Level: Enlightened
    Posts: 24
    la on #40342

    I want to be able to:
    Make a custom profile tab
    Make the content in the sub nav section (a shortcode for a profile form) be specific to a specific user ID.
    Each form shortcode is relevant to a particular company/profile ID.
    Defining visibility and availability by role won’t work for me. I need to make the content specific to specific profiles.
    Is there a way to do this?

    I’ve tried BuddyPages also but you can’t, as an admin, control the profile specific page. The profile owner has access to those pages which doesn’t work either.

    Is there some way to make a profile specific tab/link or tab/content which is specific only to that profile? Maybe a profile field with a link to a page but then it’s not inside their BB profile area.

    Thanks in advance for any help.

  • Keymaster
    (BuddyDev Team)
    Posts: 19833
    Brajesh Singh on #40344

    Hi,
    Thank you for the question.

    There are two ways to achieve it.

    1. If you have a shortcode that accepts user id, you can use our tag replacement feature for it.

    You can change

    
    
    [som-shortcode user_id=32] 
    
    

    to

    
    
    [some-shortcode user_id="#displayed_user_id#"]
    
    

    Now, the plugin will replace this token ‘#displayed_user_id#’ with the actual user id of the displayed user before the shortcode is handled.

    2. If you want to put static content specific to each user, You can install an addon plugin to achieve it. Please have a look at the following.
    https://buddydev.com/create-dynamic-user-profile-tabs-for-buddypress/

    Hope it helps.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 24
    la on #40348

    Hi Brajesh,
    Thank you for the reply.

    As for #2 you mentioned: the problem with that (I have installed it and spent quite a bit of time with it) it only lets you control the content displayed by role. That doesn’t do me any good. I need the content (a shortcode for a formidable form) to be relevant only for the profile displayed. I’m convinced there must be a way to solve this.

    As for #1 you suggested:

    1. If you have a shortcode that accepts user id, you can use our tag replacement feature for it.

    You can change
    [som-shortcode user_id=32]
    to
    [some-shortcode user_id=”#displayed_user_id#”]

    Can you explain that in more detail? How would I create the tag replacement?
    That sounds hopeful! I’ll check to see if the form shortcode allows for user_id.

    Thank you!

  • Keymaster
    (BuddyDev Team)
    Posts: 19833
    Brajesh Singh on #40349

    Hi La,
    Thank you.

    For the approach 2, the token replacement is done by the Profile Tabs Creator Pro. all you need to do is to tell it using the above token where you need actual user id.

    So, if the formidable form provide you with a shortcode which accepts the user id, instead of passing actual user id in that shortcode, pass the value as ‘#displayed_user_id#’

    That will make sure the actual user id of the currently displayed user is passed.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved