Title: [Plugin: WP-Menu] Secondary menu &#8211; incorrect permalink
Last modified: August 20, 2016

---

# [Plugin: WP-Menu] Secondary menu – incorrect permalink

 *  [oasisfleeting](https://wordpress.org/support/users/oasisfleeting/)
 * (@oasisfleeting)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-menu-secondary-menu-incorrect-permalink/)
 * > Wondering about the secondary navigation with this plugin…
   > I used this declaration in my sidebar.php file because I want to display a 
   > secondary navigation on every page:
   > <?php
   >  wp_menu(‘nav_type=secondary&heading=h2&div=1’); ?>
   > I was expecting to see an unordered list of child pages with the parent page
   > listed as an <h2> above all wrapped in a nice little <div>.
   > The problem is that the hrefs for the child links are all missing a backslash
   > before the child page name.
   > I.E. [http://www.website.com/parent-namechild-name](http://www.website.com/parent-namechild-name)
   > Obviously that isn’t working. Any idea how I can get a backslash between [parent-
   > name] and [child-name]?
 * I’m experiencing the same issue.
    urls look like [http://www.mysite.com/categorypage](http://www.mysite.com/categorypage)
   instead of [http://www.mysite.com/category/page](http://www.mysite.com/category/page)
   The code i’m using is
 *     ```
       <div id="sub-nav-text">
       <?php wp_menu('nav_type=secondary&parent_id=' . $post->post_parent . ''); ?>
       </div>
       ```
   
 * [http://wordpress.org/extend/plugins/wp-menu/](http://wordpress.org/extend/plugins/wp-menu/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [oasisfleeting](https://wordpress.org/support/users/oasisfleeting/)
 * (@oasisfleeting)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-menu-secondary-menu-incorrect-permalink/#post-2153946)
 * around line 270ish I added this code
 *     ```
       /*oasis hack: add forward slash*/
       				if($params['nav_type'] == 'secondary')
       					$ret[$x]['link_href'] = $params['select_href']."/".$result[$x]->post_name."/";
       				else
       					$ret[$x]['link_href'] = $params['select_href'].$result[$x]->post_name."/";
       ```
   
 * Thanks for no help.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP-Menu] Secondary menu – incorrect permalink’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-menu.svg)
 * [WP-Menu](https://wordpress.org/plugins/wp-menu/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-menu/reviews/)

## Tags

 * [permalinks](https://wordpress.org/support/topic-tag/permalinks/)
 * [SEF URL'S](https://wordpress.org/support/topic-tag/sef-urls/)

 * 1 reply
 * 1 participant
 * Last reply from: [oasisfleeting](https://wordpress.org/support/users/oasisfleeting/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-menu-secondary-menu-incorrect-permalink/#post-2153946)
 * Status: not resolved