Support » Plugin: Better Section Navigation Widget » Configuring parent page as first list item

  • Resolved Ray Gulick

    (@raygulick)



    Rather than having the parent page be a subheading, is it possible to reconfigure it as the first list item enclosed by the ul element? I’m not seeing how to do it without editing the source code, which I don’t want to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Ray! Apologies for the delay in responding to you.

    This isn’t currently possible without writing some custom code – you’d need to either modify the plugin or filter its output. Otherwise, the markup created by Better Section Navigation will always mirror the hierarchical structure of the pages it’s listing. (If you’re curious, Better Section Navigation uses the wp_list_pages() function under the hood – see https://developer.wordpress.org/reference/functions/wp_list_pages/ for more info).

    In your particular case, if you want your parent page to appear in the section navigation as a “sibling” alongside its child pages, that might be a sign that it should really be a sibling instead of a parent. Is there another page that they could all be children of instead?

    Thanks. I got things worked out to my satisfaction by making the widget-title a paragraph and some small adjustments to CSS.

    While I understand the distinction between parent and children that comprise a section, many of us perceive all of the pages in a section as being siblings, the ‘parent’ simply being the first page of the section. I guess that’s what I was hoping to find a way to make the code reflect.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.