dropdown onepage

Front page Support Forums Kanso Theme Support dropdown onepage

This topic contains 3 replies, has 2 voices, and was last updated by  satori 3 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3437

    parklane05
    Participant

    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,
    sebastian

    #3441

    satori
    Member

    Hey 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 Studio

    #3487

    parklane05
    Participant

    hey 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

    #3494

    satori
    Member

    Hey 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

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.