4
votes
1answer
178 views

Category as Class for Custom Post Type

I've only just realised that custom post types don't appear to output the category as a class in the loop, via post_class and I wonder if anyone can suggest a work around. Is this something that ...
0
votes
1answer
69 views

different post-class when template is loaded via ajax

my event-item.php <?php /** * The event template */ ?> <li> <article id="event-<?php the_ID(); ?>" <?php echo event_canceled($post) ? post_class('wrapper canceled') : ...
0
votes
1answer
48 views

Apply Post Class to Custom Post Type

I am trying to add specific CSS post classes to the services custom post type. However, when I apply this function to the post class filter, it applies the function to all post types. My goal is to ...
0
votes
3answers
3k views

current-menu-item class for custom post type parent

Im having a problem with my menu and custom post type. I have a custom post type of "services". I have created new page for it called Services. On that page Im displaying a list of all the post from ...
1
vote
1answer
52 views

How to assign classes to all elements?

Is it possible to assign classes to elements of certain type? For example, all paragraphs in the post body or comment body should have class="paragraph", all unordered lists in post body should have ...
0
votes
1answer
92 views

Add a class to post_class if more than one post shares same meta_value_num

I would like to be able to add a class such as .samedate to posts that share the same meta_value_num from a custom meta box. So for example: Say two posts share the same custom meta box value for a ...
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 ...