• Resolved Brock Poling

    (@brock-poling)


    I am struggling with the SimpleFolio theme. The interface claims to allow me to select which elements (pages, posts, custom links) that appear in my menu, but regardless of what I try every new page I create gets included automatically in the top / bottom nav menu.

    I am not much of a coder, but I manage to stumble my way through it, can any one point me to where the menu items are kept so I can edit them directly?

    Here is my site (so far) if you would like to take a look: https://www.concealandcarryhq.com

    Thanks for any help you can provide.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Brock Poling

    (@brock-poling)

    So digging some more, I have found this code in my header.php file

    <div id="wrapper">
    		<div id="header">
    			<div id="logo"><a href="<?php bloginfo('home'); ?>"><img src="<?php echo sf_get_logo(); ?>" alt="<?php bloginfo('name'); ?> - <?php bloginfo('description') ?>"/></a></div>
    			<div id="pagenav">
    				<ul class="sf-menu" id="nav">
    					<?php wp_list_pages('title_li='); ?>
    				</ul>
    			</div>
    		</div>

    I think what I need to do is replace the wp_list_pages function with the elements I have specified in a custom nav. (Yes?)

    Does anyone know where these custom nav elements are? Or what I would replace the wp_list_pages(‘title_li=’) with to replace the listing of pages with the custom nav items?

    Thanks in advance for hour help.

    You don’t have to touch the code in order to change what shows up in your nav menu. You just need to head into Appearance -> Menus

    There, you can slip any links & text you want to show up.

    Thread Starter Brock Poling

    (@brock-poling)

    Hey Zamphatta.

    Thanks for your response. Actually my problem is whenever I add new pages they always end up in my top / bottom nav menu automatically. I am unclear about how to add new pages and NOT include them in the nav.

    Do you have any thoughts on this?

    Thanks again for your help.

    Thread Starter Brock Poling

    (@brock-poling)

    Thanks esmi. I read all the documentation and I think I am close, but I am still struggling just a bit.

    I added this to my functions.php file

    /* Register Functions - Added to original theme */
    		function register_my_menus() {
     			register_nav_menus(
        				array('header-menu' => __( 'Header Menu' ) )
      			);
    		}
    		add_action( 'init', 'register_my_menus' );

    And in my header.php file I replaced this:

    <div id="pagenav">
    				<ul class="sf-menu" id="nav">
    					<?php wp_list_pages('title_li='); ?>
    				</ul>
    			</div>

    with this:

    <div id="pagenav">
    
    					<?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>
    
    			</div>

    When I do this I can now WHICH menu shows up (YEAH!!!!). But now the formatting is a bit screwed up. The menu is stacked on the far right and I have lost the original formatting.

    If I don’t remove the <ul class="sf-menu" id="nav"> line the entire menu is missing. Clearly this is playing an important role in the formatting, but I haven’t quite figured out what the conflict is.

    You can see it at https://www.concealandcarryhq.com

    I am close. Thanks again so much for your help.

    Do you have any thoughts on how I can recover the original formatting?

    You can try with the following:

    <?php wp_nav_menu( array( ‘theme_location’ => ‘header-menu’,
    ‘menu_class’ => ‘sf-menu’, ‘menu_id’ => ‘nav’
    ) ); ?>

    Please take a look at this to configure the menu:
    https://codex.www.ads-software.com/Function_Reference/wp_nav_menu

    Thread Starter Brock Poling

    (@brock-poling)

    Success!!

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I edit my Menus?’ is closed to new replies.