Sitemap Page build from Menu?
Something like this? “This plugin generates a customizable sitemap which you can add to any page on your site using a simple shortcode.” Atlas HTML Sitemap Generator
Something like this? “This plugin generates a customizable sitemap which you can add to any page on your site using a simple shortcode.” Atlas HTML Sitemap Generator
The following works, but with the following caveats. It will run for every menu, but it will not run for wp_page_menu, a usuall default callback if a menu can’t be found. Finally, menu items aren’t necessary pages – so you may want to do some logic to check that the menu item you are dealing … Read more
This may not be the ideal solution, depending on what you need the class for, but you could add a “parent” class via JavaScript. The line below uses the jQuery :has() selector: $(‘#nav-id’).find(‘li:has(ul)’).addClass(‘parent’);
have you ticked the ‘Description’ box under ‘Show advanced menu properties’ in the ‘screen options’ tab in the appearance -> menus page? and have a look at this related post: http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output
It is possible. Two options: If the subpages are just children of the currently displayed page, you call: wp_list_pages( array ( ‘child_of’ => $GLOBALS[‘post’]->ID ) ); See Codex documentation. Very simple. If you need a custom structure, for example a list of custom taxonomies when a special post type is viewed, you need to create … Read more
based on : http://wpfirstaid.com/2010/10/extend-the-wordpress-menu/ function wpa_58902($items){ $search=”<li class=”search”>”; $search .= ‘<form method=”get” id=”searchform” action=”https://wordpress.stackexchange.com/”>’; $search .= ‘<label for=”s” class=”assistive-text”>Search</label>’; $search .= ‘<input type=”text” class=”field” name=”s” id=”s” placeholder=”Search” />’; $search .= ‘<input type=”submit” class=”submit” name=”submit” id=”searchsubmit” value=”Search” />’; $search .= ‘</form>’; $search .= ‘</li>’; return $items . $search; } add_filter(‘wp_nav_menu_items’,’wpa_58902′);
If you want a frontend page you’ll have to create one with your plugin’s shortcode as the content. Then you display your plugin’s output in-place of that shortcode: /* Plugin Name: WPSE67438 Page plugin */ class wpse67438_plugin { const PAGE_TITLE = ‘WPSE67438’; //set the page title here. const SHORTCODE = ‘WPSE67438’; //set custom shortcode here. … Read more
The Navigation Menus system is adding a lot of classes, including matching current page (rather intelligently, it will even try to detect custom URLs, that were input explicitly). The simplest class to make use of is current-menu-item, but there are quite a few more dealing with parents/ancestors and more. Codex has them documented at wp_nav_menu() … Read more
The wp_list_pages() function will generate a hierarchical list of pages for you.
Effectively you can do this by adding a sublevel item with the same menu slug as the top level, while changing the submenu item title. This avoids the look of duplicate menu items, even though the destination of the top level, and the first sub menu item are the same. You have to have at … Read more