Category template with no posts
-
Hi there,
I am currently in the process of designing a custom theme for my blog. I have Pages displayed horizontally (Home, About, and a couple of other static pages), and I aim to use Categories in the sidebar for the main navigation. An example of my category structure:
Gaming
– Games Design
– Games Reviews
– Gaming Linksand so on..
I am happy for Games Design/Reviews to default to the archive.php template so that a list of the posts is shown. However, for Gaming Links, I would like to have a page of external links – preferably links in various sections. I can easily make a custom category template for this, but it seems it only works if a post is assigned to that category (obviously). Is there a way to do it without a post or hide the post?
The reason I want to use a Category rather than a static page is so that the menu item is nested within the other categories. I don’t know of a way to manually place a Page link there (within ‘wp_list_categories’), and besides I have more top-level (and sub-level) categories below this so it would not necessarily be the last in the list (I’ve just thought of maybe nesting multiple ‘wp_list_categories’ calls around ‘wp_list_pages’ calls, while setting each to display different categories – I might look into this).
One last thing – I abandoned the idea of having expanding menu (mostly for accessibility reasons), so all categories are displayed. But the top level item is redundant (I don’t want users clicking on it). Is there a way to disable category links, but still show the category? I have considered simply removing any hover effects and setting the mouse cursor to ‘pointer’, but wondered if there was a way to remove the actual link behaviour?
Thank you for your time.
- The topic ‘Category template with no posts’ is closed to new replies.