• Resolved jodamo5

    (@jodamo5)


    Hi. I have a sidebar (that you helped me with) which shows the siblings and children of the current page. It’s working really well.

    However now I have some hidden pages in some of the sections. My ideal scenario is to have the menu display when someone is viewing one of those hidden pages.
    e.g. If the structure is:
    Patients
    > Page 1
    > Page 2
    Doctors
    > Doc Page 1
    > Doc Page 2
    > Hidden page

    When the visitor is on “Hidden page” I would like them to see “Doc Page 1” and “Doc Page 2” in the sidebar.

    I was thinking one way to do it might be to have a second sidebar widget, which only shows if the current page is NOT in the menu. And get it to show the siblings and parent if the parent is Level 2. But I couldn’t get that to work.

    Here is my current shortcode:
    [cmwizard menu=3 branch=current depth=2 ancestors=2 ancestor_siblings=2 exclude_level=”1″ siblings=1 container_id=”nav_menu-3″/]

    Is this possible?

    Thanks
    Josh

    https://wordpress.org/plugins/custom-menu-wizard/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wizzud

    (@wizzud)

    I’m sorry to be a bit dense, but would you mind explaining what you mean by…

    …some hidden pages in some of the sections.

    In what way are they “hidden”?
    Is there a menu item for them, or not?
    Is it the page that is “hidden”, or is it the menu item that points to the page that is “hidden”?
    Are the pages marked as ‘Private’, so only viewable by logged-in users?
    Are the menu items “hidden” by some specific CSS?

    You have a structure (presumably a menu structure) that has a sub-level of 3 items : “Doc Page 1″, Doc Page 2” and “Hidden Page”.
    You have a CMW setup that, when on “Doc Page 1”, will output all 3 items at that level. It will do the same thing when on any other page at that level, including “Hidden Page” … so I don’t see the problem.

    Unless … maybe you don’t want the “Hidden Page” menu item to appear on any menu? In which case can you not simply Exclude it (Qualifying with Current Item is in Menu)?

    Again, I apologise if I’m not grasping something obvious.

    Plugin Author wizzud

    (@wizzud)

    Hmmm, perhaps I should have paid more attention to the post title, and not got distracted by the “structure”!

    Going by the title, it would seem that these “hidden pages” are simply not (currently) in the menu?

    In which case, depending on whether the menu is being used elsewhere or not, you might be able to add these “hidden pages” to the menu and then Exclude them in CMW?
    You could position them where appropriate for the desired output set (at the “Doc Page 1” level, for example), and set a Qualifier to say Current Item is in Menu. This will then produce output – but not the Excluded items – even when the user is on one of those “hidden pages”.

    This would only work if the menu was not being used elsewhere and in such a fashion as to display those “hidden pages”, because while CMW could exclude them, other display mechanisms might not.

    Thread Starter jodamo5

    (@jodamo5)

    Hi. Thank you for your very gracious reply, given that I hadn’t explained how the pages were “hidden” properly. Your second reply understood my problem exactly – I had not put the “hidden pages” into the menu structure. But I have now followed your advice and added them to the menu and then added them to the exclusion list.

    Once again, your plugin is incredibly powerful and flexible. Thank you for your highly responsive support. I’ve just put through a donation as thanks for all your work.

    Plugin Author wizzud

    (@wizzud)

    Thank you, much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Having my sidebar menu appear on pages that are not in the menu’ is closed to new replies.