Does anyone know of any plugins or a simple way t开发者_开发百科o have a 4 column menu on the wordpress footer populated with Categories / and or Pages please?
Thanks
If you have custom menus activated in your functions file in your theme you can add a custom menu to your footer quite easily, like so:
<ul id="nav" class="bottom">
<?php wp_nav_menu(array('menu' => 'Nav Bottom')); ?>
</ul>
If you don't have custom menus already activated, make sure to place this bit of code in your functions.php file:
//Wordpress custom menu support
if (function_exists('add_theme_support')) {
add_theme_support('menus');
}
Add this to your functions.php:
//register custom menu
function register_my_menus() {
register_nav_menus(
array( 'g-nav' => __( 'Global Navigation' ), 'f-nav' => __( 'Footer Navigation'))
);
}
As you can see in the above code, you can:
- Register as many custom menus as you like
- Name the custom menu as you like (the name that will appear on the left of the Custom Menu section will be the one that you define within ('') in the code above.
Following on from there, add the following snippet to the area you wish for the custom menu to appear:
<ul id="menu">
<li><?php wp_nav_menu(array('menu' => 'g-nav')); ?><li>
</ul>
Next go to your CSS and style it according to how you'd like the columns to come out. It could be something like this:
#menu ul{
list-style-type:none;
}
#menu li{
display:inline;
padding:5px;
}
Once you're done, you just need to go to your Dashboard and look for the Custom Menu module and select it. You should be able to figure the rest yourself as it's pretty straightforward from there on.
精彩评论