Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //php used to show the descriptions
- <?php
- add_filter('walker_nav_menu_start_el', 'add_description_to_menu_item', 10, 4);
- function add_description_to_menu_item($item_output, $item, $depth, $args) {
- if ( !empty($item->description)) {
- $item_output .= '<span class="menu-item__description">' . $item->description . '</span>';
- }
- return $item_output;
- }
- /*css styles the WP Nav menu descriptions*/
- .menu-item__description {
- color: var(--shade-ultra-light);
- font-size: var(--text-s);
- font-weight: 200;
- display: block;
- padding: 10px 40px 30px 40px;
- margin-top: -20px;
- line-height: 1.2;
- }
- /*makes submenu container text wrap at min 300px*/
- .brxe-nav-menu .bricks-nav-menu .sub-menu {
- white-space: normal;
- min-width: 300px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement