It is easy to make this work if your theme don’t support post formats
-
Create a child theme
-
add_theme_support
for post formats -
Remove the loop from your template files and add replace it with
get_template_part( 'content', get_post_format() );
. Your template should look like thisif ( have_posts() ) { // <- Not necessary in single.php while ( have_posts() ) { the_post(); get_template_part( 'content', get_post_format() ); } }
-
Everything else should go into a new file which should be called
content.php
-
Create a new file called
content-image.php
and add the loop in there and modify as needed -
When a post is assigned the
image
post format,content-image.php
will be used inside single.php to display the image posts
Look at one of the bundled themes how to exactly make use of post formats
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
- Target all posts that are NOT aside or link 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?
- 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
- Display/query post formats
- How to filter by post-format in admin?
- Is it possible to remove the “standard” post format?
- Custom post types vs post formats : future-proofing – is one less “future proof” than another?
- Does WordPress generate an automatic page for post formats?
- Post Formats in the context of the Database ‘Save Post’ function
- Get post only from ‘standard’ post format
- How can I add dropdown widget/box to admin post page?
- Help altering a query to exclude all but standard post format
- How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1
- 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?
- Exclude Post Format from next_post and prev_post
- Filter the_content() in the Quote Post Format to Display Quotes
- How do I use this PHP library to access OpenGraph data in a child theme?
- WordPress add post format support not working
- Assign post format to categories
- How to Link to all posts that have the Standard Post Format
- How to preserve exact formatting when copy pasting from Facebook into WordPress (or elsewhere)?
- There is any way to remove post-format filter? [closed]
- How to use format post in a pertinent way
- Post Format Default Content
- Post titles below the post format content
- How to exclude post formats from wordpress recent posts in a tabs widget [closed]
- Difficulty with PHP function that displays a post’s format in WordPress
- Is it possible to filter the display name for post formats for display in the Formats meta box?
- Exclude post format from get_posts
- Will renaming a `content.php` file cause any problems?
- Query only the posts with a post format of “audio”
- Understanding Post Formats/Custom Post types Etc
- Is it possible to customize the post according to post format in single.php?
- Get post format and use it as a CSS class in different spans
- Taxonomy – Exclude post format from showing on page
- How can I prevent posts with no title showing up in my query?
- how to retrieve the image title for image Post Format
- display post format text in loop
- get_template_part() Not Working in Loop
- Display post formats differently on index.php (loop in function)
- Month display in English but required in Swedish?
- Wrap posts p tags in div
- Conditional for Post Format
- How to Render Post Types in RSS Feed?
- Add Post Format Support to Twentyeleven Child Theme
- How can I correctly redirect user to the submitted post and define a template for each new post in WordPress?
- How does one go about converting custom post type to post format?
- How can I globally italicize list of texts in the UI database or Posts? [closed]
- My custom theme text and content format
- How to get all posts in gallery post format template
- Archive of post format for Custom Post Type
- set_post_format called after wp_update_post when using bulk edit?
- Change post template the proper way
- Why is my custom post type shown in the wrong place?
- Custom single.php files for different post formats
- Exclude post formats in custom loop
- How to query posts from single post format on Genesis framework
- Post Format Status [closed]
- Show a featured image with “Link” Post Type?