-
Author
-
December 30, 2018 at 01:34 #215833forrestParticipant
How do you add a custom buddy press page?
Wanting to create and add a custom “global members landing page” that is only visible in the main menu and only accessible when member are logged in.
December 30, 2018 at 11:12 #215840Kieran_SQModeratorHi,
Are you referring to creating a new tab within the user profile? If so you can follow this support article on how to create one of your own https://rtmedia.io/docs/developers/create-new-buddypress-profile-tab/. Please bear in mind you’ll need some PHP knowledge to achieve this custom development.
If this is not what you were referring to then please feel free to provide more information so I can better assist you.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
December 31, 2018 at 02:31 #215864forrestParticipantNot a tab on the user profile…as mentioned in my question…a custom page.
A custom PAGE that is only visible in the main menu to logged in members (like a typical buddy press page ex: groups, profile, etc.)
December 31, 2018 at 03:02 #215865forrestParticipantFor instance, the Buddypress pages are only visible when members are logged in.
We need a custom page like this that only appears in the menu once the member is logged in.
December 31, 2018 at 11:32 #215871Kieran_SQModeratorHi,
In that case there isn’t really such a thing as a BuddyPress page. Pages like members, groups, register etc are all standard WordPress pages that are dynamically filled with content from the BuddyPress plugin when assigned in WP Admin > Settings > BuddyPress > Pages.
You can create any page you wish, fill it with content and then use the below code in your KLEO Child theme’s functions.php file to restrict the page to logged in users and redirect logged out users to X page
COPY CODE// Redirect from signup page if logged in function redirect_logged_out_if_page_is() { if ( !is_user_logged_in() && (is_page( 'my-private-page' )) ) { wp_redirect( home_url( '/destination-if-logged-out/' ) ); exit; } } add_action('template_redirect', 'redirect_logged_out_if_page_is');
Replace my-private-page for your privates pages slug.
Replace destination-if-logged-out for the page you wish to redirect logged out users to when they access the page.For menus please try using the plugin Menu Item Visibility Control which can be found here https://wordpress.org/plugins/menu-items-visibility-control/. See screenshots on how to use the plugin, for your purposes you should use in conjunction with !is_user_logged_in()
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
-
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.