• Hi, after activating a custom themes, these menu are missing from Appearance:

    1. Menus
    2. Themes Options
    3. Background
    4. Header

    My Menu Appearance only consisting of three items: Themes, Widgets and Editor.

    How to restore the missing items ?

    Is there anything to do with functions.php ?

    functions.php

    <?php
    
    add_filter('get_comments_number', 'comment_count', 0);
    	function comment_count($count) {
    		if (! is_admin()){
    		global $id;
    		$comments_by_type = &seperate_comments(get_comments('status=approve&post_id=' .$id));
    		} else {
    		return $count;
    		}
    	}
    
    	remove_action('wp_head', 'rsd_link');
    	remove_action('wp_head', 'wlwmanifest_link');
    	remove_action('wp_head', 'feed_links_extra', 3);
    
    	function remove_generator() {
    		return '';
    	}
    
    	add_filter('the_generator', 'remove_generator');
    
    	function login_error_mess(){
    	return 'ERROR: Invalid username or password.';
    	}
    
    	add_filter('login_errors', 'login_error_mess');

    Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Is this only happening on one site of a Multisite?

    Thread Starter davy_yg

    (@davy_yg)

    No, others also experience the same problem. But they don’t need to change the menu navigation background so I leave it that way, while this one I really need to change it’s background and I am looking for the Appearance Menu.

    The default themes has complete appearance menu.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The fastest way to check would be to rename the functions.php in your child theme to functions.txt

    I don’t see anythign that would do that, but it really depends on how the parent theme implemented it’s menus.

    Thread Starter davy_yg

    (@davy_yg)

    I just try renaming the functions.php to functions.txt and it does not do anything to the appearance menu, it still remains only three items.

    I wonder why Twenty Eleven theme has a complete appearance menu items ? If I deactivate my custom theme and switch to Twenty Eleven theme, the appearance menu restores to complete menu.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    What theme is this?

    Thread Starter davy_yg

    (@davy_yg)

    Well, the development concept is similar to:

    Chrisspooner.zip

    I am following his tutorial when I first learn how to build my own themes:

    Theme Tutorial

    His theme also only shows 3 items in the appearance control panel.

    This is a site that I am building right now: Site

    Unfortunately only shows 3 items in the appearance control panel. It gives a hard time in editing the menu background :).

    Can you help me figure why ? The Chrisspooner theme is free and the basic codes are the same like mine.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The short answer is: This is a theme issue.

    Something in the THEME is preventing the menus in the control panel. So you really should be testing this out on a non Multisite install (localhost) first before you push it live. Bet you would have see this then ??

    Moving to the theme section for more traction.

    As @ipstenu said: this is a THEME issue.

    1. Menus
    2. Themes Options
    3. Background
    4. Header

    All of these are features that must be enabled by the Theme. The functions.php code you posted does not have anything related to enabling these features.

    For navigation menus, you need to register your nav menus, along with a defined theme_location for each one. e.g.:

    function mytheme_register_nav_menus() {
        register_nav_menus(
            'primary_navigation' => 'Primary Navigation',
            'footer_navigation' => 'Footer Navigation'
        );
    }
    add_action( 'after_setup_theme', 'mytheme_register_nav_menus' );

    For Custom Background and Custom Header, you simply need to add Theme support, e.g.:

    function mytheme_setup() {
        add_custom_background();
        add_custom_image_header();
    }
    add_action( 'after_setup_theme', 'mytheme_setup' );

    Theme options are probably out of scope for this support topic.

    Thread Starter davy_yg

    (@davy_yg)

    Parse error: syntax error, unexpected T_DOUBLE_ARROW in C:\xampp\htdocs\wordpress\wp-content\themes\ocklaw\functions.php on line 35

    Line35: ‘primary_navigation’ => ‘Primary Navigation’,

    Do I need to change the naming from your codes ? If register the navigation then, will I be able to change the navigation through CMS or simply able to change the navigation background through the appearance menu ?

    Sorry, wrote that a bit quickly. Forgot the containing array:

    function mytheme_register_nav_menus() {
        register_nav_menus(
            array(
                'primary_navigation' => 'Primary Navigation',
                'footer_navigation' => 'Footer Navigation'
            )
        );
    }
    add_action( 'after_setup_theme', 'mytheme_register_nav_menus' );

    I recommend reading the Codex entry for register_nav_menus().

    Thread Starter davy_yg

    (@davy_yg)

    Warning: Missing argument 1 for add_custom_image_header(), called in C:\xampp\htdocs\wordpress\wp-content\themes\ocklaw\functions.php on line 47 and defined in C:\xampp\htdocs\wordpress\wp-includes\theme.php on line 1575

    Warning: Missing argument 2 for add_custom_image_header(), called in C:\xampp\htdocs\wordpress\wp-content\themes\ocklaw\functions.php on line 47 and defined in C:\xampp\htdocs\wordpress\wp-includes\theme.php on line 1575

    Yes, you need to add valid callbacks to add_custom_image_header().

    Read the Codex. It is there to help you understand functions and template tags:

    add_custom_image_header()
    add_custom_background()

    Thread Starter davy_yg

    (@davy_yg)

    ok, i’m still trying to figure out how it works.

    Meanwhile, if anyone can help me on this topic would be great!

    Thread Starter davy_yg

    (@davy_yg)

    Well, now the complete appearance menu appear:

    functions.php

    Still lots of error when I try to change the header for instance. and also more importantly, I cannot change the menu item background. I would like a grey box with reverse gradient background on hover and press for each menu item. How to do that ? I can create the image, but how to integrate them to the navigation ?

    web link

    One more thing, why there is a blank space on the top after I edit the functions.php?

    Still lots of error when I try to change the header for instance. and also more importantly, I cannot change the menu item background. I would like a grey box with reverse gradient background on hover and press for each menu item. How to do that ? I can create the image, but how to integrate them to the navigation ?

    web link

    One more thing, why there is a blank space on the top after I edit the functions.php?

    These are separate questions from your OP. You should post a new topic for them.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Missing items in Appearance menu’ is closed to new replies.