Forum Replies Created
-
AuthorPosts
-
January 30, 2013 at 7:56 am in reply to: How do I add the category ID into post classes on the homepage? #16383leeMember
Sorry for replying so late, I didn't get an reply notice in my inbox.
Thought we were onto something there but we're not. The demo themes on StudioPress use category names like category-1 and category-2... That's why the source code for those themes appears to have the category 'ID' number in the HTML tag class. Went through Blissful's functions.php and home.php to check and there's nothing special in there.
January 29, 2013 at 7:39 am in reply to: How do I add the category ID into post classes on the homepage? #15951leeMemberThe blog's homepage displays all categories. I want to color each blog post excerpt differently according to the category it is in.
For example,
1) The homepage displays the 10 most recent posts.
2) The site has 5 categories: red (id = 1), orange (id = 2), yellow (id = 3), green (id = 4) and blue (id = 5).
3) Post excerpts of red category posts need to display with a red background.
4) Post excerpts of orange category posts need to display with an orange background etc...If I can get the <div> that encases each post excerpt to include the category ID as its class then I can achieve different coloring for each excerpt based on category.
The actual site has over 30 categories. I already know the category IDs because I've already configured the site to style category pages differently according to category ID but I can't get the homepage excerpts to reflect the category ID styling without inserting the category ID in each excerpt's <div>.
January 29, 2013 at 7:09 am in reply to: How do I add the category ID into post classes on the homepage? #15942leeMemberThat will be okay if it's a grid of one column 😉
They need to display as a single column list similar to the way they display in the parent Genesis theme or the default Twenty Twelve theme.
-
AuthorPosts