Custom Menu
-
Hey everyone!
I’ve been working on my custom menu for a while now.
And I can’t seem to understand why it is not working.
This is my blog: http://www.tech-heads.comHere is what i have done so far:
Added this code to functions:
<?php add_action('init', 'register_custom_menu');
function register_custom_menu() {
register_nav_menu('custom_menu', __('Custom Menu'));
} ?>Then I added this code to my Header.php:
<?php wp_nav_menu(array('menu' => 'custom_menu')); ?>Here is when it become tricky.
When I use the following code:<div id="navigation">
<?php wp_nav_menu(array('menu' => 'custom_menu')); ?>The Menu works, but it is not styled at all! Note, i’m using a pre made theme.
However when i try this:
<div id="navigation">
<ul id="nav">
<?php wp_nav_menu(array('menu' => 'custom_menu')); ?>
This doesn’t work. This is with the styling and everything.
What is weird though is, when you refresh the page a lot, by pressing the logo, you will see that sometime the menu displays the disappears.I really need this to be working.
Here is what used to work(just listed categories)
<div id="navigation"><ul id="nav">
<?php wp_list_categories('exclude=1&hide_empty=0&orderby=name&show_count=0&use_desc_for_title=1&title_li='); ?>And this worked fine, but i wanted to make a Custom Menu.
-
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘Custom Menu’ is closed to new replies.