Better Section Navigation Widget

plugin banner

Creates a new widget for listing section-based navigation. Essential for contextual navigation when using WordPress as a CMS! Also implements a functi …

Author:Cornershop Creative (profile at wordpress.org)
WordPress version required:2.8
WordPress version tested:5.7.7
Plugin version:1.6
Added to WordPress repository:14-06-2017
Last updated:14-10-2022
Rating, %:100
Rated by:4
Plugin URI:https://cornershopcreative.com/plugins/better...
Total downloads:9 842
Active installs:900+
plugin download
Click to start download

Adds a new widget type you can deploy in your sidebar regions (and/or elsewhere) to display section-based navigation, along with the ability to exclude certain pages from showing up.

The title of the widget is the top level page within the current section. The widget then can show all of the page’s published 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. It 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 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. Use a specific widget title (i.e. In This Section), or just use the top level page title
  7. Determine whether the section title should be linked
  8. 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. The UL of the page list also has a custom class, bsn-list, that can be altered via the bsn_list_class filter.

Beginning with version 1.5, Better Section Navigation also incorporates the features of the defunct Exclude Pages plugin, giving you the ability to selectively exclude specific pages from appearing in the widget generated by Better Section Navigation. This per-page control is managed via a metabox on the post edit screen. Note: On activation, BSN will automatically import the list of “excluded pages” set via that plugin, so you don’t have to manually re-assign excludes pages before deactivating the old one.

Compatible with WordPress Multisite.

This plugin started life as Simple Section Navigation Widget, but since that plugin hasn’t been updated in a while, we’ve taken up the reins with the goal of keeping it up to date with the latest WordPress conventions (i.e. getting rid of deprecation warnings) and adding a few nice-to-have features while retaining some of the simplicity of the original plugin.

Simple Section Navigation Widget is incompatible with PHP 8.x, so as of October 2022, Better Section Navigation is now a drop-in replacement for Simple Section Navigation Widget. If you’ve been using Simple Section Navigation, you can now use this one instead without changing any settings! NOTE: Deactivate Simple Section Navigation Widget before activating Better Section Navigation.


Screenshots
FAQ
ChangeLog