New Front EN › Support Forums › Kanso Theme Support › dropdown onepage
- This topic has 3 replies, 2 voices, and was last updated 10 years, 5 months ago by satori.
-
AuthorPosts
-
June 6, 2014 at 9:24 pm #3437parklane05Participant
hey andrii,
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 #3441satoriKeymasterHey Sebastian,
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?
Sincerely,
Andrii / Satori StudioJune 12, 2014 at 7:24 pm #3487parklane05Participanthey andrii,
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.
sebastian
June 13, 2014 at 9:43 am #3494satoriKeymasterHey Sebastian,
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.
In case you need a WP expert to help out with this customization, I can provide links to a couple of websites with decent quality freelancers: Elto, Envato Studio.
Sincerely,
Andrii / Satori Studio -
AuthorPosts
- You must be logged in to reply to this topic.