[Resolved] Secondary Nav or custom 'site map'?

Home Forums Support [Resolved] Secondary Nav or custom 'site map'?

Home Forums Support Secondary Nav or custom 'site map'?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #115558
    Peter Duggan

    http://www.khsmusic.info/home/site-map/

    Thought I might be able to do this through GeneratePress Secondary Nav and display it on just that page through CSS, but not sure from trying to configure the Secondary Nav whether I can get this format with full ‘menu’ and no drop-downs?

    It’s currently hand-coded as nested lists, but obviously I’d prefer it to update automatically when new pages are added so wondering if there’s a (relatively) simple way to do this?

    #115574
    Tom
    Lead Developer
    Lead Developer

    Hi Peter,

    Why not use the “Custom Menu” widget, then apply your CSS to it?

    You can add the widget to your content with this plugin: https://wordpress.org/plugins/widget-shortcode/

    This will allow you to create a menu in “Appearance > Menus”, and then use it on the page with your custom CSS.

    Let me know ๐Ÿ™‚

    #115591
    Peter Duggan

    Thanks, Tom

    But I’ve just realised I should be able to do exactly what I want with the built-in ‘Pages’ widget when I’ve worked out how to apply that to just a single page. Not sure whether or not that *requires* another plugin (?), but I’ve just seen one called ‘Widget Logic’ that looks like it does the job…

    #115602
    Peter Duggan

    So close but not quite there yet…

    The ‘Pages’ widget produces exactly the linked page list structure I want and I can obviously style the output how I like. But I’ve tried both ‘Widget Logic’ and ‘Widget Context’ plugins to restrict it to my ‘Site Map’ page with the following identical results:

    1. I get the desired ‘Pages’ widget on the page I want.
    2. I get a dummy widget (e.g. ‘Replace this widget content’ etc.) instead of no widget on every other page.

    Don’t know whether that’s caused by some conflict with GeneratePress or just me missing something, but still trying to find out!

    #115604
    Peter Duggan

    And exactly the same behaviour with the ‘Display Widgets’ plugin…

    Edit: have to try the ‘Widget Shortcode’ thing you suggested but I’d already forgotten about (sorry!) because I didn’t need to make the Custom Menu, so will give that a go and report back.

    #115611
    Peter Duggan

    OK, it’s done!

    Installed/activated Widget Shortcode and replaced my whole ‘Site Map’ page with:

    <div id="sitemap">
    [widget id="pages-4"]
    </div>

    (Where the widget is the standard ‘Pages’ widget sorted by page order.)
    Then just kept my existing CSS with two small additions:

    #sitemap h2.widgettitle {
    	display: none;
    }
    #sitemap li {
    	margin: 0;
    	padding: 0;
    }

    To give me exactly what I’d coded before, but now auto-updating on creation of new pages. So problem solved, with apologies for initially missing the relevance of the Widget Shortcode plugin even without the Custom Menu I didn’t need from your answer!

    I’ve got one other question about page ids, but will post that separately.

    Thanks again
    P

    #115618
    Tom
    Lead Developer
    Lead Developer

    Sorry I didn’t get back to you sooner! Glad you got it working just the way you wanted ๐Ÿ™‚

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