Jake Goldman by Jake Goldman download
requires 2.8+
25 votes
19,020 downloads
updated Mar 25 '11

Simple Section Navigation 2.1 for WordPress

A customizable widget for for section based page navigation.

Adds a widget to your sidebar for section (or top level page) based navigation. The title of the widget is the top level page within the current section. Shows all page siblings (except on the top level page), all parents and grandparents (and higher), the siblings of all parents and grandparents (up to top level page), and any immediate children of the current page. Can also be called by a function inside template files.

It includes a simple widget configuration panel. From this panel you can:

  1. Determine whether the section navigation widget should appear on the home page
  2. Override standard behavior and have the widget show all pages in the current section
  3. Determine whether the widget should appear even if the section only has one page (the top level)
  4. Provide a list of pages to exclude from the output
  5. Determine whether the section navigation should still appear when viewing excluded pages
  6. Determine whether the section title should be linked
  7. Determine page sort order (defaults to menu order)

The widget uses standard WordPress navigation classes, in addition to a unique class around the widget, for easy styling.

Calling section navigation inside template (without widget)

Function name: simple_section_nav()

Parameters:

Example:

simple_section_nav('before_widget=<li>&after_widget=</li>&exclude=2&show_on_home=1');

Will wrap the widget in LI tags, exclude page ID 2, and will output on home page.

  1. simple-section-navigation screenshot 1

    Screenshot of widget output on "Open Source" page under top level page "My Portfolio", running Twenty-Ten theme

  2. simple-section-navigation screenshot 2

    Screenshot of widget configuration.

29 Replies

  1. What can I do to cause this to not display sibling pages? Other than that, this is a perfect plugin!

    Sharon MirandaMarch 30, 2011 at 10:30 pmReply
    • Jake Goldman

      You can use CSS to selectively hide siblings… this plug-in is designed to show siblings, so there’s no option for that built in.

      Jake GoldmanApril 4, 2011 at 1:51 pmReply
  2. Incredible plugin. This does everything I could have asked for with wp_list_pages, and more!

    Loren HelgesonApril 12, 2011 at 4:45 pmReply
  3. It would be awesome if there was a way to control the depth of children display, so that for instance only the sub-pages of the current page you are on are displayed. Anyway- thanks for a great plugin. =)

    WillApril 13, 2011 at 12:41 pmReply
  4. Hi there,

    Thanks for your plugin ! I was wondering what I could modify in your code to avoid the present page to be linked to itself.

    I managed to avoid the title to be linked to itself by modifying the following line :

    if ($instance['a_heading']) {

    with :

    if ($instance['a_heading'] && $post->ID != $top_page) {

    But youre are using a filter to render children list … How can I modify it ?

    Thansk a lot for your response !

    mathieuMay 10, 2011 at 5:21 amReply
  5. any idea admin ?

    mathieuMay 16, 2011 at 6:00 amReply
  6. Hey there,
    your plugin is really awesome, it’s exactly what I was looking for!

    I came across a problem though, the navigation won’t show on post pages (the ones that use single.php aka the last ones in hierarchy).
    I use the structure Home > Categories as subsites > Post in that Category. My navigation is in the sidebar template.

    Navigation shows up on all three levels, even on all pages, except on the site of the post itself. I guess it’s because it doesn’t have any children (?).

    I’m also using BreadcrumbNavXT and Pathless Category Links, but deactivating them doesn’t change a thing.

    Help would be greatly appreciated :)

    ChristianeMay 26, 2011 at 10:47 amReply
    • Jake Goldman

      The plug-in is for page navigation, not category navigation.

      Jake GoldmanJune 6, 2011 at 5:21 pmReply
  7. Hi Jake. This plugin is working great. Thank you!

    Is there a way to assign a shorter title for use in the navigation? Similar to how you can do that in WordPress menu manager… so that the page title can be long but then the sidebar link isn’t too long?

    TzaddiJuly 25, 2011 at 10:15 pmReply
  8. This is working fine in terms of the pages displayed, and it appears fine on “static” pages (the them default template). But if I select a different template e.g. a page with posts I get an empty widget container, or in the case of another page with posts option (2 cols, excerpts only) I get the heading but no menu! The theme I’m using is Weaver 2.2.4, example pages are:
    working on http://stourvalechurches.org.uk/churches/west-stour/
    select “special events” from this – not working
    select “testing different templates” – title only appearing

    Any advice appreciated

    TeresaAugust 21, 2011 at 1:39 pmReply
    • Jake Goldman

      It sounds like the page templates are not resetting the post query ( wp_reset_query() ) after the run special queries to list the posts (etc). The plug-in depends on seeing what the “current” post ID is.

      Jake GoldmanSeptember 19, 2011 at 7:46 pmReply
  9. hi, i have used your plugin to great effect on many sites and i truly love it. however, on my current project the widget is spitting out all pages in the section on all levels regardless which page you are on. this is a fairly large site, so i’m showing lots of unnecessary cousin pages. i’m wondering if there are any know conflicts between this plugin and others, as I think that may be where the problem lies.

    Thanks so much for your help!

    kristinAugust 22, 2011 at 3:56 pmReply
    • Jake Goldman

      Most definitely sounds like a conflict!

      Jake GoldmanSeptember 19, 2011 at 7:47 pmReply
  10. WOW!!! I LUV this one too—you read my mind! Together with your Simple Page Ordering, it works great!

    I’m a code-clueless WP newbie building a pages-only site, so I’m overjoyed to find a “plug ‘n’ play” portable page-navigation widget that I can use to do what I gotta do.

    Right now, it’s in a vertical sidebar. My theme (Suffusion) also enables a “widget area above footer.” I would prefer to have it there with the links side-by-side.

    Is this option already built in? After a month-long Crash Course, I can handle a tiny bit of CSS/PHP [huh?] editing; so if you tell me what to do, I can follow your step-by-step instructions.

    Hhmmm… I may need the same “Shorter Title” option suggested by Tzaddi to make the link IDs fit where I want them to go.

    You are still on my Accounts Payable To-Do List, and I’m about to vote ****** “It Works” with Version 3.2.1 at the WP plug-in page.

    AnnaSeptember 2, 2011 at 7:35 amReply
Older Comments

Leave a Reply