Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( function_exists('wp_nav_menu') ) {
- add_theme_support( 'nav-menus' );
- register_nav_menus( array( 'primary-menu' => __( 'Primary Menu' ), 'secondary-menu' => __( 'Secondary Menu' ) ) );
- // Add category descriptions
- if ( get_option('woo_menu_desc') == "true" ) {
- add_filter('walker_nav_menu_start_el', 'description_in_nav_el', 10, 4);
- function description_in_nav_el($item_output, $item, $depth, $args) {
- return preg_replace('/(<a.*?>[^<]*?)</', '$1' . "<br /><span>{$item->post_content}</span><", $item_output);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement