Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to edit the Buddypress default theme navigation?

  • I’m trying to figure out how to edit the default theme, but I’m stuck on where and how to edit the look of the navigation…the horizontal menu bar? Can someone point me to a tutorial on how to edit this?

Viewing 11 replies - 26 through 36 (of 36 total)
  • @aces

    Participant

    ( https://codex.wordpress.org/Navigation_Menus )

    In your child theme’s functions.php file:
    `function register_my_menus() {
    register_nav_menus( array(
    ‘primary’ => __( ‘Header Navigation’ ),
    ‘secondary-menu’ => __( ‘Alternative Menu’ ),
    ‘another-menu’ => __( ‘Another Menu’ )
    ) );
    }
    add_action( ‘init’, ‘register_my_menus’ );
    `

    @pinhit

    Member

    oh right so this is the way to add my own secondary menu !! great

    sorry to be a pain aces, is there any particular place to nest this..? or am I deleting / replacing existing code..?

    I haven’t copied a functions.php file to my child theme yet..I guess I should do this first and make the edits in there right !

    @aces

    Participant

    If your child theme hasn’t got a functions.php file then create your own in a simple text editor such as notepad++.

    The first line should be just “ with nothing after it. ( The same php tags as the bp-custom.php file )

    Then place something like the above nav menu function and action in between the tags….

    For more info check the codex link above or http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus

    @pinhit

    Member

    I’ve just come across this about creating a functions.php for my child theme taken from here –> https://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/

    ” You must make sure you give your child theme functions a unique name, otherwise they will clash with the parent.”

    Is this correct..?

    @aces

    Participant

    @pinhit

    yes… unless you have a good reason….

    @pinhit

    Member

    sorry could you possibly elaborate ?

    what should I name the child theme functions.php?

    for example – my-theme-name-functions.php..

    @aces

    Participant

    functions.php is the same name in both the parent and child theme.

    The name of any functions within should be unique!

    ie: in the earlier example `function register_my_menus()` should be the only occurence of ` register_my_menus()` otherwise you might change it to `function register_dude_menus()`

    @pinhit

    Member

    Oh right, sorry at first glance it threw me, I thought it meant make a unique name for my child themes function.php and didn’t realize it meant the code within.

    So to clarify would it be correct to call it: function register_my child theme name_menus ?

    or: function register_name of secondary location_menus ? for example: if I call my secondary menu – ‘logged out’ etc

    @aces

    Participant

    You should just be able to leave it as it is. `register_my_menus` doesn’t exist in the bp-default child theme functions.php file.

    @pinhit

    Member

    okay great thanks

    fingers crossed ;)

    @pinhit

    Member

    Aces you are the man !!!

    I bit the bullet and gambled and it paid off :)

    Now I just need to re-arrange my banner because it’s playing peekaboo lol

    many many thanks for your input, not to mention your patience on this edit sir

Viewing 11 replies - 26 through 36 (of 36 total)
  • The topic ‘How to edit the Buddypress default theme navigation?’ is closed to new replies.
Skip to toolbar