1
vote
1answer
93 views

Output terms to post_class()

I am trying to output all terms attached to a specific post (including custom taxonomy terms) as CSS classes applied to a DIV Something like that : <div <?php post_class('class-name'); ...
1
vote
1answer
122 views

Add a class to post title if a link ends with a certain extension

I am using a Page Links To plugin that allows me to link the post title to an external web page, rather than to the content of the post. And I link some of the post titles to external pages, and ...
0
votes
2answers
1k views

adding a custom css class to post

essentially I need to be able to add a class to a post when it show in the list (say index.php) so when in the back end you can say oneCol, twoCol, threeCol and it will then output this within the ...
1
vote
1answer
106 views

How to make classes for posts?

Thanks in advance. I'd like to have posts with different colored borders and headers. It would be nice to choose a category of the post (red, blue, black, etc.) and have it change the class for that ...
2
votes
2answers
945 views

Get parent category class in post_class()

I am trying to add the parent category class in post_class() of some posts from one of my subcatgories. I have an advanved theme so I need to style all the posts from the parent cateogry using it's ...
1
vote
1answer
852 views

Duplicate attribute class causing site validation error

The following bit of code results in a duplicate attribute site validation error. This template script: <div class="clearfix" <?php post_class() ?>> produces this source output: ...