Secondary menu - incorrect permalink (2 posts)

  1. oasisfleeting
    Posted 4 years ago #

    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:


    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

    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
    instead of 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 . ''); ?>


  2. oasisfleeting
    Posted 4 years ago #

    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."/";
    					$ret[$x]['link_href'] = $params['select_href'].$result[$x]->post_name."/";

    Thanks for no help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Menu
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic