BuddyDev

Search

Buddypress 0 How to set the show_in_rest to true

  • Participant
    Level: Initiated
    Posts: 2
    Tom Wanstall on #49616

    Hello

    I was hoping for some guidance on how to set the show_in_rest to true?
    I want pages to show up as options hooked elements so I can target these pages with custom hero content. Is this possible and how can I achieve this please?

    Thank you!

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3050
    Ravi on #49619

    Hello Tom,

    Welcome to the BuddyDev Forums. I am unable to understand your requirement clearly. Please explain more. Have you written any custom code to achieve this if yes share it too.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 2
    Tom Wanstall on #49621

    Apologies for not making myself clear.

    I use Kadence elements which uses hooks to add/replace content in areas of pages and posts. The targeting setting brings up a list of pages and posts which can be selected as the location for the custom content.
    I wanted to create a hero banner with title to be displayed on the buddypress profile pages but when it came to selecting the pages in Kadence elements they don’t appear.

    I contacted Kadence support and they said “You will need to contact BuddyPress and ask them how we can enable or set the show_in_rest to true. Once that’s enabled, those pages will show up as options in Gutenberg as well as in the hooked element Display Settings.”

    I’ve since searching online but haven’t found anything so wondered if you good people knew how to do it?

    Thank you.

    Tom

  • Keymaster
    (BuddyDev Team)
    Posts: 24339
    Brajesh Singh on #49628

    Hi Tom,
    Thank you for the details.

    I will try to assist.

    There are 2 kind of section in BuddyPress- Directory and single component(e.g user/group)

    BuddyPress uses ‘page’, so show_in_rest is already true for them.

    If you are trying to customize individual tabs of single component, they are not handled as page and there is BuddyPress specific REST API available here.
    https://developer.buddypress.org/bp-rest-api/reference/

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 2
    Tom Wanstall on #49629

    Hi Brajesh,

    Thank you for getting back to me.

    I’m not trying to customize for each tab but have a generic banner that is displayed on all the tabs.
    Thank you, this helps.

    Tom

  • Keymaster
    (BuddyDev Team)
    Posts: 24339
    Brajesh Singh on #49632

    Hi Tom,
    In that case, you should be able to do it as the Members page is backed by a page(though contents in the the_content section get replaced by BuddyPress).

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved