Support » Developing with WordPress » Internal dropdown menu from boxes

  • I am trying to do an odd request that I have not done before. I can’t link to the page in question because it is password-protected, but this is more of a general question about how to accomplish this.

    Here is a screenshot of the part of the mockup that is relevant: http://imgur.com/a/hhJG1

    I’ve got these boxes with their images and titles, etc. lined up in 2 rows like they are in the mockup, but I’m not sure of the best way to go about making this collapsible, hidden menu for the items or the left and right navigations parts on the bottom.

    Any help is greatly appreciated. Thank you all.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    You can generate a generic dropdown of pages with wp_dropdown_pages(). It’s just a select/option list of pages. You’ll need some javascript or similar to actually navigate based on the selection. You can restrict which pages are listed by passing arguments that are valid for get_pages(), even if they are not listed on the doc page. Pages can be ordered by the menu order field so they can stay in sequence.

    You can get the next and previous page links with get_adjacent_post_link(). The queries for this function work differently than the dropdown. You can customize the queries to work in a similar manner with “get_{$adjacent}_post_where” and “get_{$adjacent}_post_sort” filters.

    Thanks for your thorough response. My knowledge of PHP is extremely limited so I don’t know what to make of this after reading those pages you linked.

    Is there a way to accomplish this within the page by using other means? Thank you.

    Moderator bcworkz

    (@bcworkz)

    You can try searching for navigation plugins that offer functionality that meets your needs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Internal dropdown menu from boxes’ is closed to new replies.