You’re on the right path. You can add classes to your content in the loop based on the terms assigned to each piece of work. For example,
<?php if( has_term( $term, $taxonomy, $post ) ) { $work_classes="big-item"; } ?>
<div class="<?php echo $work_classes; ?>"> ... </div>
This only adds the class big-item when the taxonomy term exists on that post. To get has_ter to work, fill in $term with the slug, $taxonomy with the taxonomy slug, and $post with the post id or object.
More information: https://codex.wordpress.org/Function_Reference/has_term
Related Posts:
- Display category name on featured image in wordpress excerpt
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- Can I set a default featured image for a category?
- How can I add the featured image functionality to a custom taxonomy?
- How can I make post fields required in WordPress?
- How to add a background image to category and display image on category page
- Create a full width responsive header image per page
- Remove “Category Archives: title” at the top of a category page [duplicate]
- Hide post meta data on a specific category
- Display the featured image from the last post
- Display child categories in WooCommerce
- How to make a Thumbnails Mosaic
- Highlight wp_nav_menu when category is selected
- Category location styling
- Category index featured image
- Hide woocommerce category name from specific pages
- Hide woocommerce category name from specific pages
- Style category link depending on category ID
- Inside a loop, how to change CSS class based on category name?
- Redirect to another page using contact form 7? [closed]
- Display thumbnails for certain category posts
- Why do I have stray bullet from
- Random Featured Image Based on Category
- How to add custom color fields to the category edit page?
- Category images are not displaying in WordPress
- why get_the_post_thumbnail( the_ID()) echos extra post id
- Different CSS class by category
- Simple way to style posts of a single category differently in the loop and in single
- Remove Archive | from Categories
- Custom css per category and per single post belong in each category
- Restrict CSS on one page
- Category view with contents of [gallery]s shown
- Random category with recent post title and thumbnail
- Show Secondary Sidebar on Category pages (archive)
- How to add icon over specific thumb
- Display post thumbnail for specific category outside the loop
- How to add image for all posts associated to specified category?
- How to get sub-categories to display same look as there parents
- How to display WooCommerce category image in my category page banner as a background?
- category description not showing in my woocommerce
- Inline If statement to echo CSS [closed]
- How to make product image inherit from category image
- show thumbnail for subcategory wordpress
- How to “remove” WordPress categories UL and make the list loop in a horizontal line?
- How to add excerpt and read more button to category archive page
- How to hide/remove featured images in particular categories post?
- Custom field picture instead of post thumbnail on category page
- Custom CSS to resize elements in multiple categories
- Display last postings of 5 categories on homepage
- How to enable admins/editors to set a featured image for specific category?
- WordPress excerpt for specific posts in category
- Way to show content of a post, but if exceeds character limit revert to excerpt?
- Featured image for links and categories
- Custom Woocommerce Category view
- Broken category styling
- How can i hide the authors box from a specific set of categories and post types?
- How to prevent page re-sizing for mobile browsers [closed]
- Show thumbnails 1-12 of category x on any given page
- How to display the category featured images [closed]
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing
- How to hide my categories pages’ names, and how as well to reduce the space beween my sidebar’s widgets?
- How can I get the categories and subcategories separately?
- Elementor : display only one category in loop grid
- Putting a Category of posts under a Page
- change recent posts based on category
- How can I change the tooltip in the_category?
- Category.php loads first before page.php?
- wp_update_post is not updating category
- What’s wrong with my wp database query?
- Include WooCommerce product to all child categories
- Length of Category Names
- Category url generate 404 error
- Style a category from category list
- Adding a page summary to a specific page
- Add a category on all archive category pages
- Check for parent category
- I need advice on how to structure the categories according to the layout i have
- Problem with wp_create_category
- Product category display in tabs
- Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
- Pull in an “Include” file based on a WordPress Category ID
- Why is URL Slug Saving Differently From How It’s Been Defined?
- How to set acf color field as background color to product category
- How to add all subcategories as submenu in WordPress menu
- How to noindex, follow a specific category wordpress?
- Category pages resolving with and without category prefix
- get taxonomy list in a page in the wordpress
- Is there a way to allow users to customize their feed view?
- Number of categories slowing down the site
- Subcategory Page 404ing
- displaying one category on one page
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- How to make 10 post of one category
- Listing category
- Image width issue in IE [closed]
- Custom permalinks structure
- Weird html output of single_cat_title – is not inside of the html element?
- Replace category titles inside RSS feed
- Display last category child in permalink
- How can I filter Query Loop to show only posts in current category?