Show a single category and up to 10 posts in a menu
-
Hi All,
Ok, so, i have a category called “tours-of-duty” which is category id 4
I want to be able to show this in the top menu, as well as up to 10 of the lastest posts in it. I have seen how to get posts from a particlar category, and show all categories, but not just bfrom 1 category.
My desired out put would be like:
<ul> <!-- standard WP menu output --> <li class="first current_page_item"><a href="https://localhost/501tag/">Home</a></li> <!-- then show my specific category, and up to 10 posts within it --> <li class="page_item page-item-2"><a href="https://mywebsite.com/category/tours-of-duty/" title="Tours of Duty">Tours of Duty</a> <ul> <li class="page_item page-item-3"><a href="https://www.mywebsite.com/category/tours-of-duty/" title="TOD 2009">TOD 2009</a></li> </ul> </li> <!-- wrap up the menu output --> </ul>
Any pointers in the right direction would be really appreciated, as all my searching hasn’t come to fruit.
Regards,
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Show a single category and up to 10 posts in a menu’ is closed to new replies.