View difference between Paste ID: xHHxuHdQ and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
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 | } |