EvanAgee / vuejs-wordpress-theme-starter

A WordPress theme with the guts ripped out and replaced with Vue.
https://vuewp.com/
1.6k stars 282 forks source link

The menu setting invisible under appearance #62

Closed xmqywx closed 4 years ago

xmqywx commented 5 years ago

WP Version: 5.2.2 Issue: The 'Menu' disappeared under appearance menu.(Appearance -> Menu option is not showing) Solution: Add add_theme_support( 'menus' ); code in functions.php 💯

Tes3awy commented 4 years ago

It's required to add the add_theme_support( 'menus' ) into the function.php file. Here is a snippet which you can add to show the Appearance > Menu item.

add_theme_support('menus');
add_action('init', 'register_my_menu');
function register_my_menu()
{
    register_nav_menu('header-menu', __('Navigation Menu'));
}

You might also want to show the Featured image, and you can do so by adding only this line:

add_theme_support( 'post-thumbnails', array( 'post' ) );

You can also add 'page' into the array.

Feel free to close the issue. Thank you!