Edited:
Now that I understand your question, try this…
Place this above your title to enable the post_class function.
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Then add </div>
below your title (or excerpt, or wherever you want this special styling to end).
Now, a special class will be added in which you can use the classes for post formats. for example, you may now use .format-aside
in your CSS to style the aside.
Related Posts:
- has_post_format() vs. get_post_format()
- What difference does it make if I enable support for video post format?
- How do I remove the post format meta box?
- Adding post-formats to Twenty Ten child theme
- Is there a real life use case for post formats except for microbloging?
- Renaming post formats after Gutenberg
- What is the recommended behavior for the post formats?
- Custom Post Formats
- Filter the first from Quote Post Format
- Displaying all Video Post Formats to Page
- Display Post Format as a String
- Different markup for each post format
- How to recognise on which site the content is being rendered?
- post formats – how to get the relevant content part?
- Post formats for Pages not saving
- Is there any problem if I use get_template_part like this?
- How can I remove the first video from a post and feature it?
- previous_post_link/next_post_link disappear when excluding by post_format
- Usage of post_formats
- how to get list of post formats supported by theme?
- Formatting Standard Post Format
- If post-format == ‘gallery’ conditional
- Adding new post format on plugin activation
- post formats – where’s the difference: “aside” vs. “status”?
- How to get the id or url of the image in an image post?
- About post format
- Smart post format loop problems
- “post-format” code snippets list [closed]
- wordpress post formats
- How to display quote format by preg_match function?
- I would like to have a quote page just to show quotes
- How to display list of video post on video section?
- Paste from word not preserving formatting
- How to treat post formats?
- Post formats and template hierarchy
- Change standard post format metabox
- Next Post Link in format
- Mass post format changer?
- Displaying cf post formats with oembed
- Custom formatting
- Is There a Difference Between Taxonomies and Categories?
- Only get_posts of certain post formats
- How do I query by post format in WordPress 3.1
- Are content.php and content-single.php the same?
- Is it possible to rename a post format?
- How to set a default format for a custom post type?
- Display/query post formats
- How to filter by post-format in admin?
- post formats – how to switch meta boxes when changing format?
- static variable loop not working in WordPress
- How do I add a new custom post format?
- Is it possible to remove the “standard” post format?
- Custom Post Formats for Custom Post Types
- Custom post types vs post formats : future-proofing – is one less “future proof” than another?
- Does WordPress generate an automatic page for post formats?
- Different post format options per custom post type?
- How to query posts of standard post format. For real
- Post Format Archive template name for theme folder?
- Display posts for a single post format
- Post Formats in the context of the Database ‘Save Post’ function
- Get post only from ‘standard’ post format
- Changing “Enter title here” based on post format
- How can I add dropdown widget/box to admin post page?
- How to exclude posts of a certain format from the feed
- Post format selector in Thematic child theme post class
- Help altering a query to exclude all but standard post format
- Plugin to set all Posts in a certain Category to a certain Post Format
- Post formats template
- Update caption for metabox gallery images
- How to show post format gallery metabox image caption in the post front end
- Get image captions for images on gallery post format metabox
- How to edit layout of a particular post format?
- How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1
- How to get post attachments in gallery post format template
- Change post format using custom field
- How to enqueue scripts depending on post formats?
- Removing the post format (type) slug
- Add URL field to the link post format
- Link Featured Thumb to Attachment Page, If Possible
- Auto-embed link info from URLs in link post format?
- How to create an archive for all posts that do not have a post format?
- How can I achieve something like has_post_format( ‘standard’ )?
- How to change post format from Aside to Image for all posts?
- How does WP detect format type (and can I make use of this)?
- How to generate a featured image from a video embeded in a metabox
- Strip shortcode from specific post types (formats)
- Hide meta box based on post format
- Exclude Post Format from next_post and prev_post
- How to load a different header based on post format?
- Apply post formats to a specific post type only?
- Filter the_content() in the Quote Post Format to Display Quotes
- Tumblr-like Post Types for WordPress
- Post Format single-loop.php using get_template_part
- Query different number of posts with different formats in one go
- Is possible to add post-formats to custom-post-type?
- How to query for posts without a post_format
- How to filter posts by format and category via url?
- Checking post format during xmlrpc_publish_post
- Filtering post-formats from the loop using new WP-Query();
- WordPress As A Shared Items Collection