Deprecated: Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /var/www/html/wp-includes/functions.php on line 5383

Reply To: dropdown onepage

New Front EN Support Forums Kanso Theme Support dropdown onepage Reply To: dropdown onepage

#3494
mmsatori
Keymaster

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