SHARE
TWEET

Add to menu

a guest Mar 5th, 2012 74 Never
  1. // Filter wp_nav_menu() to add additional links and other output
  2. add_filter('wp_nav_menu_items','add_pdf_to_menu', 10, 2);
  3. function add_pdf_to_menu( $items, $args ) {
  4.     if( $args->theme_location == 'extra-menu')  {
  5.  
  6.                 $pdf = 'some code i dont know i guess';
  7.         $items .=  '<li>' . $pdf .  '</li>';
  8.  
  9.         }
  10.     return $items;
  11. }
RAW Paste Data
Top