June 6, 2014 at 9:24 pm #3437
we love the one page design.
we’d like to merge two pages to one with a drop down in the header but figured out if we create a “menu” in wordpress and implement it in our page it will exclude these pages from the one page and just link to it.
the question: is there a chance to create a drop down but all pages stay in the one page design?
thanks in advance,
sebastianJune 7, 2014 at 3:21 pm #3441
I’m not sure I’ve understood what you’re trying to achieve – could you please clarify? Do you want to have both one-page sections and a separate drop-down item (that leads to other pages) in one menu?
Andrii / Satori StudioJune 12, 2014 at 7:24 pm #3487
basically we want everything as it is. we want to stay in the one page. no link to another page, the only difference is in the header. there, we want to combine two pages that are usually next to each other into one drop down. if you click on it it still scrolls down the page. so nothing different to how it is right now.
how do we get to create this drop down?
i hope you can image what i mean.
sebastianJune 13, 2014 at 9:43 am #3494
I think I understand now; the reason why drop-downs haven’t been envisaged in the one-page design is purely usability – it is better to have one level of navigation in this case since additional layers might become confusing. In principle it is possible to introduce a drop-down that would still be a part of the one-page navigation, yet since the entire one-page nav menu is generated automatically from the pages included into the one-page layout, some code customizations would be necessary. In particular, one will need to change the code on lines 129-133 of the theme’s header.php (this code generates the one-page menu), adding a new ul element with a “sub-menu” class (so that it is recognized by the jQuery that animates the menu drop-downs). The ul element should probably be based on a conditional statement, e.g. in case the query reaches posts with certain IDs, it creates the drop-down. Inside this list should be the menu items which are needed as a drop-down, yet remember to still generate a proper anchor link for each, since otherwise they will not point to the desired sections of the one-page layout.
Andrii / Satori Studio
You must be logged in to reply to this topic.