开发者

Want to use categories as pages in WordPress

I have a couple of pages (hom开发者_如何学Ce, about me, ...) in my main navigation. Now I'd like to get rid of my sidebar and I have plenty of space in my main navigation. Is there any chance I could get my categories to display in there, preferably with the subcategories displaying as childs (which will work well in the dropdown menu I have)?

Appreciated!


<?php wp_list_cats(); ?> will list your categories. It will however list them vertically so you'll need to use css in your style sheet to create a class to list the horizontally.

As for removing the side bar. If you go to your index.php and your single.php you will set something like <?php sidebar(); ?> or <?php get_sidebar(); ?> by removing this the page will no longer fetch your side bar. I would personally not advise deleting the sidebar.php file(if you have one) or deleting this line of code for formatting reasons. It is probably best to comment it out that way you can add it back if you ever decide you want a sidebar again.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜