It may helpful to you…
$video = (in_category ( 42 )) ? 'has-video' : '';
echo '<section id="cooked-recipe-list-' . $list_id_counter . '" class="cooked-clearfix cooked-recipe-' . $list_style . ' cooked-recipe-loader' . ( in_array( $list_style, $masonry_layouts ) ? ' cooked-masonry' : '' ) . ( isset($atts['columns']) && $atts['columns'] ? ' cooked-columns-' . $atts['columns'] : '' ) . ' ' . $video. '">';
Try this and let me know..
Related Posts:
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- 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
- Different excerpt styles per category, but chronological
- Highlight wp_nav_menu when category is selected
- Category location styling
- 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?
- Why do I have stray bullet from
- How to add custom color fields to the category edit page?
- 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
- Show Secondary Sidebar on Category pages (archive)
- How to get sub-categories to display same look as there parents
- category description not showing in my woocommerce
- How to “remove” WordPress categories UL and make the list loop in a horizontal line?
- Custom CSS to resize elements in multiple 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]
- 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
- Only one category per post
- How to get permalinks with category base working with sub-categories
- get_categories hierarchical order like wp_list_categories – with name, slug & link to edit cat
- Exclude categories from search query
- Programmatically create product category and add thumbnail in woocommerce
- How to order the get_categories result
- List posts by category exclude current post
- How can I calculate the total number of categories at different hierarchy levels?
- How to add a background image to category and display image on category page
- Display only deepest category on a single post?
- How we add new categories by wp_insert_post
- Show Subcategory Description
- I want exclude the particular category in sidebar
- wp_list_categories() – adding a div to each li?
- Limit function to specific post category
- How Can You Exclude Categories From Your RSS Feeds?
- Help with multiple dropdown tags search
- How to get category URL with the slug?
- Rename Default Category (Uncategorized) Via a Function
- How get permalink for the current category or tag?
- Show category images on single product page and product overview page
- Category index featured image
- Order categories by most posts
- need to add custom field in more products
- Sorting category products not working
- Show category from “Next post” and “Previous post” [edited]
- Custom archive.php: retrieve right post categories?
- How to customize categories panel?
- category pagination got broken suddenly
- How to remove specific categories from posts?
- how to get full category path including parent and subcategories
- WordPress get from single.php back to the right category page
- Categories are not listing their respective products
- Two columns in homepage each with one category
- Pagination on category.php and tag.php not working
- WordPress link to post links to category (loop)
- How do I attach a page to a category similar to how we attach media to a post?
- Display all product tags associated with a specific product category
- How replace individual elements in the RSS feed with a single string
- Adding a block with query in homepage
- what file I need to create to work date archive links?
- multiple values in an array for category__and does not work with WP_Query
- Assigning certain pages or posts to use the template of the parent page or category
- I need advice on how to structure the categories according to the layout i have
- How to get posts using category slug in ClassiPress?
- Assign author to category and not only posts
- Add properties to term object
- How to fetch common posts from two feeds?
- Show subcategories broken when WP/WC updates
- Display menu in category and sub category
- Show alternative menu based on page template AND post category
- How to change category labels in different colors?
- Display Category yearly wise in wp
- Get all subcategories IDs from categorie or categorieIDs
- Redirect category archives to pages
- How to create a category loop on my blog (ACF Plugin)
- Using heirarchial tags or Custom taxonomies
- On main page, in each post, display image depending on post category
- Images appear in the header on all pages, but not category.php
- Change single.php template based on parent category
- WordPress and “pretty permalink”
- Custom file with special code of category widget
- New Category – custom taxonomy
- Using categories and pages in menus
- Gettind 404 not found wen click the view button for a given category custom post type portfolio
- list first post of Child Category on Category page
- Use get variable when rewritten url in wordpress
- Back to category link
- Show thumbnails 1-12 of category x on any given page
- How to delete categories in WordPress