Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function toc_add_logo_to_menu($items, $args ) {
- if ( $args->theme_location == 'primary' ) {
- $image = '<a href="'. get_site_url() .'"><img src="' . get_stylesheet_directory_uri() .'/images/Taste-On-Chestnut-logo.png"></a>';
- $addr = '<span class="hp-addr"><a href="https://goo.gl/maps/tXe7o" target=_blank>505 Chestnut Street<br />Winnetka</a></span>';
- $phone = '<span class="hp-phone"><a href="tel:8474410134">847.441.0134</a></span>';
- $new_items = '<li class="menu-extra"><span class="hp-logo">' . $image . $addr . $phone . '</span></li>';
- $items = $new_items . $items;
- }
- return $items;
- }
- add_filter( 'wp_nav_menu_items', 'toc_add_logo_to_menu', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement