Want more features on Pastebin? Sign Up, it's FREE!
Guest

Add to menu

By: a guest on Mar 5th, 2012  |  syntax: PHP  |  size: 0.33 KB  |  views: 61  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data