Support » Developing with WordPress » Seasonal Toggle Switch for Menu

  • Hi Everyone,
    I’m the web manager for a resort. Every season we switch out 3 or 4 of the pages to seasonal content. They want a toggle switch that will bring the user to the out-of-season content. Basically, I need a way for a toggle switch button to change out the main menu and have a main menu for summer and winter.

    I saw this post: https://wordpress.org/support/topic/changing-the-look-of-my-homepage-to-match-the-season/
    I don’t need to change the CSS or look of the website, and I have separate pages for winter/summer.

    Any ideas?
    Thanks

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Joy

    (@joyously)

    You can already create multiple menus and choose the one you want to display.
    What else is needed?

    Moderator bcworkz

    (@bcworkz)

    We may think picking a different menu from the back end is simple enough, but it could be hopelessly confusing for some end users. If you think there’s a need for an even easier UI, the menu used can be altered through the “wp_nav_menu_args” filter. The chosen menu could be stored in an option value and filter code assigns the option value to the “menu” arg.

    Many themes have more than one menu location, be sure you’re changing the right one. You could even code it so the menu used is determined by the current date. Just don’t hardcode the date criteria. They ought to be editable through an UI somewhere.

    Thread Starter amscomultisite

    (@amscomultisite)

    Thank makes sense in theory, but my code skills aren’t good enough to write it.

    Moderator bcworkz

    (@bcworkz)

    Creating a good UI can get pretty involved. You may want to revisit how we would normally switch between menus in the back end as it is now. I’m not a good judge of such things, but I don’t see it as being all that difficult. It may be confusing at first, but it’ll get easier with practice. The existing UI is a lot easier to use than the effort of coding up a new one would be.

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