Custom Menu Widget Displayed Horizontally

Community Forums Forums Design Tips and Tricks Custom Menu Widget Displayed Horizontally

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  Robby Payne 1 year, 3 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #12186

    Robby Payne
    Participant
    Post count: 12

    I’m trying to get a Custom Menu widget to display horizontally instead of vertically.  I’m attempting to mimic a site for a client, or else I would simply move on.  I’m going to just put some plain, linked text in for now.  But below it, I will leave the vertical menu for your inspection if you choose to give me a hand.  Thanks in advance!

    http://eladbuild1.com

    #12212

    buddy_boy8403
    Participant
    Post count: 130

    You can try the below in your child theme’s functions.php file. This will unregister the primary navigation and move it within the primary sidebar inside of a widget area. From there, you can style it in you child theme’s style.css file to make it look like you need to.

    You may also need to change the default genesis layout to sidebar/content or content/sidebar in order for the new menu location to show up. You should be able to do this by logging into wp-admin and clicking on the genesis tab on the left.

    /** Reposition the primary navigation menu */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_sidebar', 'genesis_do_nav' );

    #12225

    Robby Payne
    Participant
    Post count: 12

    Thanks for the response.  I tried this with the secondary nav.  Same code and the secondary nav now shows up in the primary sidebar, but there is no way to remove it now.  I need it in the Featured Bottom Left area on the home page.  Any ideas how to get it there?  This is what I tried to do earlier (registering it other places), but I could not figure out how to get it to show up anywhere but after or before the footer.  That is close, but not quite where I need it.

    Thanks again for your assistance!

    #12227

    Robby Payne
    Participant
    Post count: 12

    Also, if you click on the “Agents” menu item, it will take you to the sample inner page and you can see what the change in code produced.  It’s the right track…just not sure if I can get it put right where I want with the functions.php or not.

    #12233

    buddy_boy8403
    Participant
    Post count: 130

    Well in that case, just remove the code I told you to add and go into wp-admin > appearance > widgets and move the custom menu widget to the Featured Bottom Left sidebar.

    #12241

    Robby Payne
    Participant
    Post count: 12

    That’s what is already there.  That green text is actually a custom menu widget, aligned vertically.  The code you suggested added the secondary nav and all it’s CSS styling to the sidebar (look at the Agents page), but there is no widget actually placed in the sidebar at this time.  It’s there because the function.php is telling it to be there.

    Putting a custom menu widget in the Featured Bottom Left sidebar was my first move and it never occurred to me that it would be so difficult to get it to lay out horizontally.  Adjusting the placement of the primary or secondary nav was the suggestion of others as well, but I can’t get it to where I need it via PHP.  Not sure what else to do.

    #12244

    buddy_boy8403
    Participant
    Post count: 130

    I’m a little confused about what you actually want.  If you just want the items in green to show horizontally, then on line 119 in your child theme’s style.css file, do this:

    li, ol, ul {
    display: inline;
    list-style-type: none;
    margin: 0 0 0 10px;
    padding: 0 10px 0 0;
    }

    If you want the buttons like what is in the primary sidebar on your pages, then in your child theme’s functions.php file, locate the code for the Featured Bottom Left sidebar and add in the code I pasted earlier within it.

    #12249

    buddy_boy8403
    Participant
    Post count: 130

    One other thing if you do the css styling I gave in the post above, you may also want to edit line 293 in your style.css to this so that your top menu fits on one line:

    #header ul.menu li a {
    color: #FFFFFF;
    display: block;
    font-family: "Times New Roman",Times,serif;
    font-size: 20px;
    margin: 0 8px 0 -12px;
    padding: 7px 2px 5px;

    position: relative;
    text-decoration: none;
    }

    #12359

    Robby Payne
    Participant
    Post count: 12

    I think I’m just going to style the green menu that is there already.  I tried adding the

    add_action( ‘genesis_sidebar’, ‘genesis_do_subnav’ );

    to the Featured Bottom Left in the function.php, but it didn’t work.  Is that the code you were talking about?  I tried it in the home.php as well, but nothing happened.

    Thanks again for your patience and help!

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.