This topic has 4 replies, 2 voices, and was last updated 5 years by Kieran_SQ.

  • Author
  • #215833
     forrest
    Participant

    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.

    #215840
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #215864
     forrest
    Participant

    Not 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.)

    #215865
     forrest
    Participant

    For 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.

    #215871
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?