• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Gokul Deepak

Gokul Deepak

GoCool and Debug

  • Home
  • WordPress
  • Android
  • How to
  • About Me

Reduce Navigation Menu to One Level Depth in Genesis

by Gokul Deepak S Leave a Comment

Reduce Navigation Menu to One Level Depth in Genesis
Below is the code to reduce the primary navigation menu to one level depth in Genesis.

add_filter( ‘wp_nav_menu_args’, ‘prefix_generate_primary_menu_args’ );
function prefix_generate_primary_menu_args( $args ){

if( ‘primary’ != $args[‘theme_location’] )
return $args;

$args[‘depth’] = 1;
return $args;

}
reduce-primary-navigation-menu-one-level-depth.php

 

Below is the code to reduce the secondary navigation menu to one level depth in Genesis.

add_filter( ‘wp_nav_menu_args’, ‘prefix_generate_secondary_menu_args’ );
function prefix_generate_secondary_menu_args( $args ){

if( ‘secondary’ != $args[‘theme_location’] )
return $args;

$args[‘depth’] = 1;
return $args;

}
reduce-secondary-navigation-menu-one-level-depth.php

Filed Under: Wordpress Tagged With: Genesis

About Gokul Deepak S

Leave a ReplyCancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular Pages

  • Home
  • How to find the date of the Facebook group it was created
  • CORS error in Apache Tomcat - Solved
  • Combine two separate files line by line in Notepad++
  • How to install OwnCloud on Bluehost
  • Elementor Plugin and Nginx Configuration
  • How to block access to the wp-content uploads folder
  • Output for timedatectl list-timezones

Archives

Categories

  • Android
  • Apache
  • AWS
  • Blogger
  • Computer Tips
  • DevOps
  • Docker
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • Hosting
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Node JS
  • Notepad++
  • PostgresQL
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

Android Android One AWS Bluehost Comparisions Custom ROM Elementor Facebook Genesis Genesis Sample Theme Google Drive How to Lineage OS Notes OnePlus One OwnCloud Rooting Smartphones Stock ROM Studiopress Tomcat Wordpress plugin

Copyright © 2023 ยท Maintained by GokulDeepak

wpDiscuz