-
Notifications
You must be signed in to change notification settings - Fork 7
Configuring Plugin Features
Several components of the navigation plugin can be enabled / disabled.
The current feature list:
- manager - Navigation manager (the "Edit Order" screens) - On by default
- widget - Content Nav widget - On by default
- links - External links with your pages - On by default
- primary - Primary navigation settings - Off by default (requires theme support)
If your install does not require one or more of these built-in features, they can be enabled or disabled by adding a constant to your wp-config.php or theme's function.php file:
<?php
define( 'BU_NAVIGATION_SUPPORTS_<all caps feature slug>', true );
define( 'BU_NAVIGATION_SUPPORTS_<all caps feature slug>', false );
For example, to disable the "Edit Order" screens for hierarchical post types, you could add the following:
<?php
define( 'BU_NAVIGATION_SUPPORTS_MANAGER', false );
These constants are best placed in your wp-config.php
file, where they will take affect install-wide. To enable features for specific themes, there is a better option.
Theme authors may wish to register support for navigation plugin features that are off by default or require theme participation. The most common use case is to support the primary navigation settings screen.
Add the following line to your theme's functions.php
file:
<?php
add_theme_support( 'bu-navigation-primary' );
For more information see Adding Theme Support for Primary Navigation Menus