bp_dtheme_main_nav( $args )

wp_nav_menu() callback from the main navigation in header.php


Description Description

Used when the custom menus haven’t been configured.

See also See also


Top ↑

Parameters Parameters

(array) (Required) Menu arguments from wp_nav_menu()


Top ↑

Source Source

File: bp-themes/bp-default/functions.php

function bp_dtheme_main_nav( $args ) {
	$pages_args = array(
		'depth'      => 0,
		'echo'       => false,
		'exclude'    => '',
		'title_li'   => ''
	);
	$menu = wp_page_menu( $pages_args );
	$menu = str_replace( array( '<div class="menu"><ul>', '</ul></div>' ), array( '<ul id="nav">', '</ul><!-- #nav -->' ), $menu );
	echo $menu;

	do_action( 'bp_nav_items' );
}

Top ↑

Changelog Changelog

Changelog
Version Description
BuddyPress (1.5) Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.