Ok I figured out how to add the terms to div’s class –
In the code I have first the category, then the post type, then a custom taxonomy tag term assigned to it –
<?php $terms = get_the_terms( $post->ID, 'YOUR CUSTOM TAXONOMY CAT' ); ?>
<?php $post_type = get_post_type($post->ID); ?>
<div class="box<?php foreach( $terms as $term ) echo ' ' . $term->slug; ?><?php echo ' '.get_post_type( $post->ID ); ?> <?php $terms = wp_get_post_terms($post->ID,'YOUR CUSTOM TAXONOMY TAGS');
foreach ($terms as $term) {
echo $term->slug;
}
?>">
Related Posts:
- WP Query – duplicated posts once including tags in search results
- wp_tag_cloud() and the_taxonomies() work but not the_tag()
- Display post from current category and same tag?
- Help with Taxonomies
- How to get Tags with specific post id
- Grid post page on WordPress with Bootstrap, the_excerpt(); Problem
- Displaying posts that belong to a specific author
- Extracting relevant tags associated with that particular single post only
- How to check if there are posts with the same tag
- How to separate each individual blog post?
- How to Rearrange WordPress Tags list on frontend using Shortcode with specific order?
- Css and function issue on author archive page
- Can I Paginate Post after every 25 tag?
- Related posts by searching post tags of single post as terms
- page.php showing loop of posts and not page content
- Inserting custom data to the_post() during loop
- Adding specific post category between posts in loop
- Display post category in foreach loop with category link
- How To Get Posts With A Specific Word
- Best way to assign post position in a news site homepage? (no categories, no sticky posts)
- How do I restart my loop with get_next_post()?
- How to display posts on a static page? (like search loop)
- Child_of not displaying all children posts.. via get_posts
- Why WP_Query(‘showposts=5’) shows only 1 post?
- Multiple loops are not reset
- Displaying Latest Posts on a Page
- Should I use posts or pages in this scenario?
- Display posts with tag that matches current post title
- Style Differently Edited Posts
- How can I make a post that belongs to a category or have specific tags, display different from the other single posts?
- Display all posts that were published before full post on single.php
- How to make classes for posts?
- Using permalinks, category slugs, and tag slugs
- List custom taxonomy specific to one custom post type
- “more” tag doesn’t appear when browsing category achives or search
- Choose whether to automatically add a taxonomy with the same name as the post
- Exclude category from
- Print all the tags from a custom post type Please
- Display tag image in post using Taxonomy Images plugin index.php
- WordPress Loop – Next 3 Posts
- Blog post per page setting conflicting with custom WP_Query?
- How to insert 2 args into 1 Wp_Query for a slideshow
- How to exclude latest x posts from a paginated query?
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- problems with loading posts in a table-row
- Blog page pagination is not working after using the offset argument
- Posts will not display on page-mypage.php
- WP Query – Posts Per Page not working in combination with category__in
- Add multiple tags to multiple posts
- CSS: How can I show a photo beyond the template’s column, but contained within the browser window? [closed]
- More then one menu items are assigned with “current-menu-item” class
- Posts list in custom taxonomy
- Pausing and Resuming WP_Query results
- Pulling in post category and children within category
- Making a custom Pagination for multi page blog post
- Can I search posts and pages for css classes?
- Post Loop Missing Most Recent Post
- Get Posts Under Custom Taxonomy
- Trying to use AngularJS with WordPress without any API
- How to : pagination in 3 different custom loops on the same page
- Pagination with an array of post objects?
- Sharing post from archive page (loop) doesn’t work
- How to render taxonomy in loop of custom post_type
- Get Image tag from content of post
- WP_Query: Mixing category__in and tag__in together
- Start WP Pagination From Number 1 in URL
- How to allow visitors to filter posts by multiple taxonomies
- How can I hide tags on a child-category page, if that tag has not been used?
- List authors with the last post title and order by last post date
- Listing Specific Categories from Current Post with Depth
- How to exclude visited posts from loop
- Use two different post_per_page limits with infinite scroll
- Saving custom fields to a custom taxonomy
- wp_query random post
- How to make the first post in the loop be styled like a “new / featured” post?
- “Right Way” to make custom Loop respect reading settings inside admin panel?
- How to setup a query to output posts by groups of five?
- Only display sticky post or latest post in custom loop
- How to order posts in an arbitrary order?
- How do I stop the loop from repeating in my category template?
- get_the_category listing in hierarchial order
- Is there a way to specify an extra class for a post or page with no title?
- How to remove in-line style of WordPress’s post content only?
- How many posts does the loop return?
- Display Posts on Custom Page
- How to make a sum of all posts displayed in a loop
- Possible to alternate between two loops
- How to get a post’s content? [closed]
- Exclude current custom post on single post
- How Do I Get My Post Tags to Alphabetize?
- Wrong post title displayed from loop
- Get Value of Post before
- WordPress query_posts by tag doesn’t work anymore(?)
- why does wordpress ignore the post args?
- Multiple Loops Breaking Pages
- add to end of post in the loop with plugin
- Conditionals if tags exist?
- First x post with another template then the others
- Loop doesn’t show title of second post and posts thereafter
- Change all author links in Blog roll