Get nav bar menu form menu appearance (2 posts)

  1. Md Nazmul Islam
    Posted 1 year ago #

    Need help to get navigation menu form appearance menu.

    <nav id="site-navigation" class="main-navigation" role="navigation">
    	<ul id="menu-breakthrough" class="nav-menu"><?php $mypages = get_pages('parent=0&sort_order=DESC&sort_column=menu_order&exclude=58');
    foreach($mypages as $page)
    	{ echo '<li id="menu-item-'.$page->ID.'" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-'.$page->ID.'"><a>post_name.'/">'.$page->post_title.'</a>';
    				 $querystr = "
    				SELECT option_value
    				FROM  <code>wp_options</code> 
    				WHERE  <code>option_name</code> =  'ep_exclude_pages'
    				LIMIT 0 , 30
    				$wp_options = $wpdb->get_results($querystr, OBJECT);
    				$children = get_children(array( 
    								'post_parent' => $page->ID,
    								'order' => 'ASC', 'orderby' => 'menu_order ID',
    								'post_type'   => 'page', 
    								'numberposts' => -1,
    								'post_status' => 'any',
    								'exclude'	  => $wp_options[0]->option_value
    				if( count( $children ) != 0 ) { 
    					echo '
    					foreach($children as $page2)
    {echo '<li id="menu-item-'.$page2->ID.'" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-'.$page2->ID.'"><a>post_name.'/'.$page2->post_name.'/">'.$page2->post_title.'</a>';}
    echo '</ul>
    echo '';

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  2. Md Nazmul Islam
    Posted 1 year ago #

    I can't get menu from appearance to navigation bar. Please some one review my code and give me a suggestion.

Topic Closed

This topic has been closed to new replies.

About this Topic