BuddyBoss Home – Web Support Forums Solutions Social Learner Different menu for external pages

Viewing 2 posts - 1 through 2 (of 2 total)
  • Question

    #60031
    @karenryanmoodyfishing-com

    HI, loving the Social Learner package thank you.

    I love how Social Learner looks for all my “internal” pages i.e. everything LearnDash and BuddyPress.

    But I’d like to have a different page template for my “public” pages i.e. sales pages. I’d like it to look like the No BuddyPanel page template, but with a different menu.

    So I created a new menu location using this:

    // Add Custom Menu Location
    add_action( 'init', 'register_my_menus' );
    		function register_my_menus() {
    		register_nav_menus(
    		array(
    			'public-menu' => __( 'Public Header Menu' ),
    			)
    		);
    		}

    Then I duplicated the relevant page template files, renamed them and put them in the child theme. I edited the new version of template-parts/header-middle-column.php to use the new “public-menu”.

    But it doesn’t work. The page still shows the BuddyPanel and it doesn’t use the new menu.

    Is there any easier way to achieve this?

    I was looking at this thread: https://www.buddyboss.com/support-forums/topic/different-my-profile-menus-on-desktop-and-mobile/

    and was wondering if I could use add_action(‘wp_before_admin_bar_render’, ‘update_wp_menus’, 999);

    If I set a custom field for the public pages and tell it to use the public-menu on pages with that custom field, would that work?

    Or is there another way you recommend?

    I hope that makes sense!

    In brief, I’d like to be able to use the full width, no-buddypanel template on some pages with a different menu.

    Thank you!

    Answers

    #60079

    Anonymous
    @

    Hi @karenryanmoodyfishing-com
    For BuddyPanel menus you do not need any functions
    You can simply add your menus from WordPress default settings
    You can use this plugin to show and hide menus for logged in user and loggged out users
    https://wordpress.org/plugins/nav-menu-roles/
    Regards

Viewing 2 posts - 1 through 2 (of 2 total)
  • The question ‘Different menu for external pages’ is closed to new replies.