Tagged: show_in_rest hooks
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!
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
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
BrajeshHi 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
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.