What you are looking for is post_class
filter.
However, it depends on the theme you are using and how they used the loop
Related Posts:
- How can I fetch CSS from JSON WP REST API response
- Custom per-page sidebar widgets .. possible?
- How do I assign this filter to a variable? (Appending php & markup to the_content)
- Save the_content into custom field
- More efficient to add content to custom fields or the content area?
- How to style posts selecting a CSS post_class (added through custom_fields?)?
- How to add a css class to custom field value?
- using advanced custom field to control css hover color
- Type character in name and make it invisble
- get_field values for each post on home page using wp_add_inline_style
- how to modify a field’s size in a metabox : ROWS height, and scroll control?
- How to add content with a filter when there’s no content in the editor
- Empty the_content for all posts
- CSS conditional on custom field value
- Include custom fields into the content of a regular page
- custom field output after the_content
- Modal pop-up HTML code works on other sites or HTML viewers but not in the custom HTML block within a wordpress page?
- Individual Widgets per Page
- How to add add_meta_box to specific Page Template?
- Apply the_content filter to a custom field with multiple values
- Meta Query with AND & OR?
- Auto sort the wp-admin post list by a meta key
- Adding another state (spam, reject, approve) to wordpress comments?
- Filter archive.php by custom meta
- How do I search an array stored in a custom-field using WP_Query?
- Get updated meta data after save_post hook
- Custom text-only header
- Show User Their Password
- How to reload the role specific registration form on validation errors?
- Currency (price) formating on custom fields
- Adding Custom Text Area to WooCommerce Product
- Gravity Forms: Create fields programmatically
- Get multiple custom field values in a $wpdb query [duplicate]
- add meta box using function.php
- Order by value in serialized custom field
- Custom image sizes for custom field media uploads
- converting custom field date format
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- Add Paypal Button programmatically
- How do I use wp_query for WordPress search?
- Nav Menu – Add class based on meta keys
- Conditionally hide or show woocommerce product variation in fontend by custom field
- custom meta box text field: how to limit to alpha or numeric only
- Accessing loop functions (e.g the_title or the_content) from post ID
- Create an Array of Specific Custom Post Meta
- Possible to add a meta field for css attribute to the editor Advanced panel?
- Excluding Specific Fields from Profile Builder Registration Form
- Add image to menu item with ACF
- How to create a shortcode to print specific values stored in a post meta array?
- How to add upload video option in wordpress for user?
- Set post to unpublished after one week depending on condition
- Search in Archive Pages by subcategory, tag, custom field and year
- Custom WP_Query for WordPress Search Results with meta_query
- Change order of posts
- Meta Query And/Or
- URL Rewrite fires when retrieving a custom value?
- How to store post meta in an array
- Efficiently sort only certain categories by custom field
- How can I do a variable for meta_query?
- Set checkbox as checked by default in a metabox
- ACF form edit front end post title does not change permalink
- How to list Category list in ACF Pro’s Select Field to choose from [closed]
- Can I use a Custom Field as the Featured Image URL?
- Display custom field & value correctly on page
- Copy price categories to custom field
- Sanitize user input fields before wp_insert_post
- Use Advanced Custom Fields – replace line of code that hardcodes the tag into the template
- Increment user meta data by 1 each time a page is visited
- Advanced Custom Fields and Post Meta Fields Relation
- Can’t Output get_post_meta?
- KEY and VALUE custom field issue
- Stripping and/or altering the content of a custom field (video URL)
- Custom field outside the loop and inside an array
- WP E-Commerce Custom Meta > Serialized array
- Display Additional Info
- Adding data to User profile
- How can I change author of posts to the value of one of the custom field of the posts?
- Is it possible to add Term Meta Fields to a WooCommerce Attribute?
- Saving Custom Field that includes Quotation marks
- Saving custom form data
- register_form, custom field not submitted on first try
- Echo out custom fields in comments
- Why WordPress takes time to make request to save post?
- Query Custom Fields in Searchform
- Make custom user_meta as permalink for post
- Creating Structured Documents (books) in WordPress?
- Filter query based on date in custom field
- Convert all dates in field to Unix time, except those already in Unix time
- Convert many posts from having a specific meta_key to use a post_format
- Custom fields: my custom checkbox area doesn’t seem to work
- get_post_custom_values not working
- PHP Puzzle: Unique Styles with PHP loop
- Show div based on custom meta value
- add multiple values (array) to post meta_input
- Assign class to Drop Down Selections in WooCommerce Products Custom Fields
- Add CSS class to posts with certain meta key
- Best way for managing images of ads banners
- Crop custom image size vs actual size
- Multiple permalinks for a single post from custom field
- Search for meta_query does not return any result if combined with title