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

Gokul Deepak

GoCool and Debug

  • Home
  • WordPress
  • Android
  • How to
  • About Me
Home » Wordpress » Reduce Navigation Menu to One Level Depth in Genesis

Reduce Navigation Menu to One Level Depth in Genesis

August 1, 2017 by GokulDeepak 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

Related

Filed Under: Wordpress Tagged With: Genesis

Authored by Gokul Deepak S

Reader Interactions

Leave a Reply Cancel reply

Primary Sidebar

Popular Posts

  • How to find the date of the Facebook group it was created
  • Home
  • Downgrade from Lollipop to Kitkat for Micromax Canvas A1 (Android One)
  • How to remove Linux OS in Tamilnadu Government Free Laptop
  • How to block access to the wp-content uploads folder
  • How to add ads.txt on Bluehost
  • Combine two separate files line by line in Notepad++

Recent Posts

  • Can’t connect to Ubuntu with SSH
  • Change Timezone in Ubuntu 20.04 – Simple method
  • Output for timedatectl list-timezones
  • PM2 Cheatsheet – Important Commands
  • MongoDB Terminal commands – Cheatsheet

Archives

Categories

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

Tags

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

Copyright © 2021 ยท Maintained by GokulDeepak