WordPress after_setup_theme Action & Function


/ Published in: PHP
Save to your folder(s)

This may be necessary to properly add theme support for multiple menus.


Copy this code and paste it in your HTML
  1. add_action('after_setup_theme','my_after_setup_theme_function');
  2. function my_after_setup_theme_function(){
  3. add_theme_support('post-thumbnails');
  4. register_nav_menus(
  5. 'primary'=>'Primary Menu',
  6. 'footer'=>'Footer Menu',
  7. 'sidebar'=>'Sidebar Menu'
  8. ));
  9. }
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.