The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
2k 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 ...
0
votes
2answers
194 views

post_class output in wrong area?

Trying this in my functions file. There is actually a lot more to this function than I am showing, but this is the important part that is messed up. function xyz_loop() { $defaults = array ( ...
0
votes
1answer
108 views

How can i remove the posts category class names from body_class

I have 2 categories, just to make an easy example, Cars and Bikes. I have a post that fits both of the category. If i visit the Cars category, the body_class looks like this: "archive category ...
0
votes
1answer
197 views

post_class() breaks out of formatting. . . extra markup also generated

Hoping Im just running into something easy Here's the scenario, I've created a function called tr_get_post_image_tplt that spits out the post thumbnail (or custom size) for the post being called. Im ...
0
votes
1answer
1k views

add filter to wp_list_categories and query if used to list tax-terms?

this is probably a confusing title of my question, but it's exactly what's describing my problem best. I want to add the category-slug as classname to my wp_list_categories() output. I found a really ...
0
votes
1answer
949 views

CSS class on last post in loop ( custom query )

I have been using this question to try to do this but I am having some difficutlty. I have a custom post type, media, and I am working on the archive-media.php template. I have it partially working ...
12
votes
5answers
906 views

How to mark every 3rd post

I'm working on a WordPress site for my band and I'd like to mark every 3rd post on our blog page to have a special class applied to it, anybody have any pointers on how to achieve this? Any help is ...
1
vote
1answer
358 views

Add Post Tags to Body Class

Want to add post tag name to body class - I am successful in using the code below to add category to body class - //adds new body class for post category add_filter('body_class', ...
1
vote
1answer
111 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 ...
0
votes
1answer
503 views

Adding post_class into functions.php query

Obvious newbie question I'm sure. Working on a friend's site and trying to figure out how to add post_class to a query. Just adding works fine and adds the div, but I don't know how to get it to run ...
2
votes
2answers
1k 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 ...
0
votes
2answers
760 views

List of Body Classes Generated by body_class()

Does anyone know where I can get a list of all the body classes generated by body_class() for every sections and every conditions, including custom post-types, etc.? For example, for a search result ...
1
vote
1answer
1k 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: ...
2
votes
3answers
2k views

Alternate post_class on each post

I need to have an alternating (even, odd...) class on posts to provide alternate highlights on a column. The best thing would be to attach this to the post_class() so that it's on every instance of ...