BuddyDev

Search

Want to use the BuddyPress Profile Tabs plugin to dynamically display content

  • Participant
    Jeff Hester on #39720

    I’ve got the Profile Tabs Pro plugin, and I’d like to use it with BuddyBoss and (ideally) the Elementor Pro posts widget. I want to create a custom query that will show all “hike logs” (a CPT we have) for the currently displayed user on a tab on their user profile.

    We have this working with custom code already, but I want to use Elementor’s post widget to control how it looks (we use it elsewhere on the site).

    Any suggestions for making this work?

  • Keymaster
    (BuddyDev Team)
    Posts: 21833
    Brajesh Singh on #39740

    Hi Jeff,
    Thank you for using the plugin.

    I am not sure if I am missing it but the BuddyBoss does not seem to allow using Elementor on their profile pages(please link me to docs if they do).

    When you create a tab, It is a just another component of BuddyPress/BuddyBoss and will behave the same way.
    Using dynamic content is easy via shortcodes. Using with elementor inside the content area of the tab is a special case.

    Elementor allow you to create template and then use those templates using shortcode, so you may do that but it is not something we use or recommend.

    https://elementor.com/help/embed-templates-anywhere-pro

    BuddyPress User profile Tabs provides you the following token to duynamically replace user id

    
    		
    #displayed_user_id#
    #logged_user_id#
    

    You can use these tockens in the shortcode instead of user id.

    Eg. if you have shortcode like [some-code user_id=”3″]
    you can re-write that as

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

    and it will use the current displayed user id.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved