June 26, 201214 yr So far im quite pleased with my first theme having only started learning how to yesterday. The only problem i have now is the menu. I am using the code below to display the pages as my navigation. <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'menu_class' => 'nav', 'theme_location' => 'primary-menu' ) ); ?> I want to be able to order it in the way i want and add a link to the homepage but im not sure how to whilst still being able to easily update it. The main problem i have at the moment though is the whole navigation seems to be pushed down the page ( see attatchment). Below is the nav styling. The search bar appears central so i dont understand why the nav doesn't as well .nav { width:550px; height:30px; background-color:#333333; margin:0; float:left; } .nav ul{ list-style:none; } .nav li{ float:left; position:relative; } .nav a{ display:block; text-decoration:none; color:#fff; padding-right:15px; font-size:13px; font-weight:bold; } .nav li:hover > a,.nav ul ul:hover > a{ color:#cc3333; } .nav ul li:hover > ul{ display:block; }
June 30, 201214 yr I am guessing that the menu is just taking all the pages that you have made so far and automatically adding it to the menu. If you want to control the order of your navigation and what pages are displayed you would need to register a Wordpress navigation in your functions.php and then in Wordpress backend you would need to create a new menu and assign it to that position. Have a read through Justin Tadlocks blog post on Wordpress navigation's. Its an really old but it should help. If you have done the that already and you thing that its a CSS issue could you post a link.
Create an account or sign in to comment