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
- Add tag to post api wordpress
- Set tags for a post – without tag creation
- Is it possible to bold certain words in a post title?
- Displaying the category name of a custom post type
- Display all posts from specific categories on a page
- Skip post in loop and mixin later
- Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy
- How to show list of posts by author and category?
- How do I reorder (pop and push) items from WP_Query?
- How to exclude latest x posts from a paginated query?
- Display content from a specific category
- Plain-text tag list?
- Reverse chronology of post listing
- Edit a post from frontend. post_tags get saved, but not separated
- posts page – different lengths of excerpt
- Create new category upon save based on post information
- how to limit and display tag?
- Custom Taxonomies Incorrectly Counting Revisions?
- How to Display Post View Count
- Remove post_tag from default post type, add custom taxonomy
- Adding Multiple Values to a Post Meta Key
- How do I get the slug of a custom taxonomy category of a post?
- Displaying the number of posts in a custom loop (without including the number of posts of a loop below)?
- Group posts by year in loop
- Alternating post layout
- Check to see if specific loop has less than certain amount of posts
- How to style the last post on the front page different than the others?
- Tags to Post-ID mysql query. Tag Search
- get_next_post() and get_previous_post() return wrong posts
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Inserting custom data to the_post() during loop
- Should I use posts or pages in this scenario?
- Posts list in custom taxonomy
- Get Image tag from content of post
- Start WP Pagination From Number 1 in URL
- Use two different post_per_page limits with infinite scroll
- Saving custom fields to a custom taxonomy
- Wrong post title displayed from loop
- Get the amount of posts on a current page
- How to get posts published on the latest date?
- Page and post loop same template
- How to change the layout of posts when viewing all posts by tag [closed]
- Tags on products vs tags on blog posts. An easy way to duplicate them
- How to display posts on custom page without declaring a posts page in reading settings?
- How can I add a class to particular paragraphs in my post?
- In what context should Categories and Tags be used
- Custom WP_Query not working correctly
- How come this loop is not working? [closed]
- posts going to 2 pages/categories only show up in 1
- displaying the categories post
- Deleting post tags removes categories
- What parameters do I need to pass to get_tags to get ALL tags for the site, when used in a post
- Display specific posts based on an ID of another post
- Remove status ‘archived’ from the default post and page view
- How to distinguish pages created by woocommerce?
- Moved a website and excerpts don’t work for old posts
- I really need help… I am looking for a solution about 28hours
- show only one category and filter by tag
- how to call recent post content in a loop ( only the content before read more tag)
- Posts are not showing up on next page.
- Find post tags words in post content and link them to tag URLs
- Can the_post_navigation() be outside of the loop?
- How to get all posts in gallery post format template
- Show Posts By Custom Field
- Hide title in Merlin Theme on posts and pages only
- Querying multiple categories in the WP loop if one of the category IDs is dynamically obtained
- Post gallery as carousel
- Showing content from WordPress ruins page CSS using WP_Query, without, content does not show
- Posts tagged with a-new-tag does not appear
- Add something after all sticky posts in The Loop
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Query posts from a specific category and selected tag
- Back up post tags
- Display Post by menu order
- Tags not appearing in “Add New Post” Page
- Getting rid of the blog page entirely
- adding custom meta as well as looping through posts
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- ‘posts_per_page’ => ’10’ does not show any post
- Automatically add class to link based on link text
- CSS – Change height of Storefront / WooCommerce product categories, but not products
- Query wordpress posts on static page
- Tag page that displays specific posts
- Get related posts matching most of the provided tags using WP_Query
- How to remove category and other tags from posts page
- posts blocks don’t show up correctly