ashatte
ashatte

Reputation: 5538

"Menus" settings disappeared from WordPress admin panel

I need to change some menu items on my WordPress site, but the option has disappeared from the Admin area. According to the documentation, a Menus option should appear under the Appearance menu, but it is not there in my installation:

enter image description here

How can I get Menus to appear where it is supposed to?

Upvotes: 8

Views: 13847

Answers (3)

Scott Wolter
Scott Wolter

Reputation: 37

You can also use of this code in your functions.php to do more with your menu tab setting:

//menu//
function register_my_menus() {
    register_nav_menus(
    array( 'top-menu' => __( 'Top-Menu' ) )
    );
}

You can also add many menu field as you need and replace it in your theme. Make sure your file is named functions.php

Upvotes: 1

ashatte
ashatte

Reputation: 5538

The problem may have been caused by a rogue plugin overwriting the functionality, but I managed to fix it by adding a functions.php file to my custom theme (in the root directory) with the following code:

<?php
    add_theme_support( 'menus' );
?>

Now Menus has appeared again:

enter image description here

Source: Function Reference/add theme support

Upvotes: 20

Mansukh Khandhar
Mansukh Khandhar

Reputation: 2582

this code to make menu in wp admin.

![add_action('init', 'create_portfolio_post_type');

function create_portfolio_post_type() {
    $args = array(
        'description' => 'Portfolio Post Type',
        'show_ui' => true,
        'menu_position' => 4,
        'exclude_from_search' => true,
        'labels' => array(
            'name' => 'Portfolios',
            'singular_name' => 'Portfolios',
            'add_new' => 'Add New Portfolio',
            'add_new_item' => 'Add New Portfolio',
            'edit' => 'Edit Portfolios',
            'edit_item' => 'Edit Portfolio',
            'new-item' => 'New Portfolio',
            'view' => 'View Portfolios',
            'view_item' => 'View Portfolio',
            'search_items' => 'Search Portfolios',
            'not_found' => 'No Portfolios Found',
            'not_found_in_trash' => 'No Portfolios Found in Trash',
            'parent' => 'Parent Portfolio'
        ),
        'public' => true,
        'capability_type' => 'post',
        'hierarchical' => false,
        'rewrite' => true,
        'supports' => array('title', 'editor', 'thumbnail', 'comments', 'tags')
    );
    register_post_type('portfolio', $args);
}

Menu look like this

Upvotes: 1

Related Questions