• Resolved Tav Yabe

    (@gustav1908hotmailcom)


    Hi, I am using the Big City 2.28 theme and I want to use my own custom menu as the main navigation. I have created the custom menu and called it ‘Main Menu’ but when I select it to be the main navigation it does not take effect i.e. the navigation menu remains the normal default menu. What do I need to edit to make it use the custom menu? is it the header? link here if needed

    Many thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Did you select the menu in Primary Menu box if your theme supports custom menus.

    Thread Starter Tav Yabe

    (@gustav1908hotmailcom)

    The theme does not have a settings page to make adjustments. I went to the Appearance>Menu page and added a new menu titled ‘Main Menu’ and then selected ‘main menu’ in the ‘theme location’ box and saved it but nothing changes on the actual site. Perhaps someone can tell me what to edit? the Theme Functions in the editor is:
    <?php
    define(‘HEADER_IMAGE_WIDTH’, ‘900’);
    define(‘HEADER_IMAGE_HEIGHT’, ‘138’);
    define(‘HEADER_TEXTCOLOR’, ‘ffffff’);
    $content_width = “600”;
    add_theme_support(‘automatic-feed-links’);
    add_theme_support(‘post-thumbnails’);
    register_sidebar(array(‘name’=>’Widgets’,
    ‘description’=>’Widgets in this area will be shown on the right-hand side.’,
    ‘before_title’=>'<h3>’,
    ‘after_title’=>'</h3>’,
    ‘before_widget’=>'<div class=”box”>’,
    ‘after_widget’=>'</div>’));

    register_nav_menu(‘main’, ‘Main navigation menu’);

    add_custom_background();

    if (!function_exists(‘bigcity_header_style’)) {
    function bigcity_header_style() {
    if (get_header_image ()) {
    ?><style type=”text/css”>
    #header {
    background: url(<?php header_image(); ?>) no-repeat;
    }
    </style><?php
    }
    }
    }

    if (!function_exists(‘bigcity_admin_header_style’)) {
    function bigcity_admin_header_style() {
    ?><style type=”text/css”>
    #header {
    width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
    height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
    }
    </style><?php
    }
    }
    add_custom_image_header(‘bigcity_header_style’, ‘bigcity_admin_header_style’);

    and the Header is:
    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <title><?php bloginfo(‘name’); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <?php if ( is_singular() && get_option( ‘thread_comments’ ) ) wp_enqueue_script( ‘comment-reply’ ); ?>
    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php wp_head(); ?>
    </head>
    <body <?php body_class() ?>>
    <div id=”header-wrapper”>
    <div id=”header”>
    <h1>“><?php bloginfo(‘name’); ?></h1>
    <h2><?php bloginfo(‘description’); ?></h2>
    </div>
    </div>
    <div id=”access-wrapper”>
    <div id=”access” role=”navigation”>
    <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
    <div class=”clearfix”></div>
    </div>
    </div>
    <div id=”root”>
    <div id=”main”>

    You do have anything to change functions.php you will need check your header.php file as that where the menu is called.

    Thread Starter Tav Yabe

    (@gustav1908hotmailcom)

    thanks govpatel, the header is:
    the Header is:

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> ? Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_get_archives('type=monthly&format=link'); ?>
    <?php wp_head(); ?>
    </head>
    <body <?php body_class() ?>>
    <div id="header-wrapper">
    <div id="header">
    <h1>"><?php bloginfo('name'); ?></h1>
    <h2><?php bloginfo('description'); ?></h2>
    </div>
    </div>
    <div id="access-wrapper">
    <div id="access" role="navigation">
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    <div class="clearfix"></div>
    </div>
    </div>
    <div id="root">
    <div id="main">

    Looks like you have different names in functions as you have this when register menu
    register_nav_menu('main', 'Main navigation menu');
    and header.php you have

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

    Thread Starter Tav Yabe

    (@gustav1908hotmailcom)

    sorry to be a little dense but I’m a complete newbie to wrodpress and html and don’t really understand what you mean. Could you tell me what I need to change on the Header or Function to make it work? Thanks for your help ??

    Change this line in functions.php
    register_nav_menu('main', 'Main navigation menu');

    to

    register_nav_menus( array(
    		'primary' => __( 'Primary Navigation', 'main navigation' ),
    	) );

    see if this works

    Thread Starter Tav Yabe

    (@gustav1908hotmailcom)

    Works a treat! Thank you so much govpatel ??

    You are welcome

    Yeehaw!

    This is just what I looked for.
    Thanks for saving my time ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Custom Menu not appearing’ is closed to new replies.