Use menu structure for permalinks

From a SEO perspective this would qualify as double content and you could get penalized by search engines for it unless you specify the right canonical URL or something, but the best practice would be to redirect one of the URL’s to the other. Whichever you consider the most important. To assist you with your … Read more

Customize Walker_nav_menu to show posts if item is category

You could either extend the Walker_Nav_Menu walker class (i.e., the start_el function is sufficient, as already mentioned). Or you could hook in when the original output (i.e., the category) has been created. That would be the walker_nav_menu_start_el hook. For instance like so: function wpdev_139801_start_el( $item_output, $item ) { if ( isset( $item->object ) && $item->object … Read more

wp_list_pages, links only for pages with no children

To create the menu in the first place, feel free to use the shortcode [AVIA_tree_menu root=”your_root_document_title”] by adding this to functions.php: function sc_AVIA_tree_menu($atts) { extract(shortcode_atts(array(‘root’ => ‘Start’,), $atts)); //default if empty. $page = get_page_by_title($root); $args = array( ‘child_of’ => $page->ID, ‘date_format’ => get_option(‘date_format’), ‘depth’ => 0, ‘echo’ => 0, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’, … Read more