associating a postbypost archive with categories used as classes
-
I am trying to create an unordered list of all of my posts while at the same time associating them with the categories that each post falls with in.
So my idea is to have a nav list of posts. this will be a list of posts (it will be a limited amount probably 20-30 at most). I can get a listing of all the posts pretty easy using
<?php wp_get_archive('type=alpha&format=html'); ?>
but I am having a hard time associating each of these list items with it’s individual categories. my goal is to have something that looks like this as a finished product.<ul> <li><a href="post1" class="category1 category2">Post 1</a></li> <li><a href="post1" class="category3">Post 1</a></li> <li><a href="post1" class="category4 category1">Post 1</a></li> </ul>
Then I could highlight those according to which category class they are associated with using jQuery.
I have been looking for something like this, but haven’t really found anything. If anyone knows of a better way or something that could point me in the right direction let me know. thanks a ton.
- The topic ‘associating a postbypost archive with categories used as classes’ is closed to new replies.