• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Add Post Formats To Any Theme

WordPress includes support for post formats built into the core.

Some themes include some post formats and others include theme specific support for posts formats.

add post formats

Regardless of what your theme supports, you can use this PHP code in your child themes functions file to over ride whatever your parent theme supports.

And here’s what the above code generates on the Post Edit screens of the Twenty Twelve default theme for WordPress.

twenty twelve post formats

The same is also true for StudioPress and other child themes running on different frameworks and parent themes.

Add Post Formats to Custom Post Types

You’ll need to add this code in your functions file to display the post formats meta box on custom post types:

add_post_type_support( 'reviews', 'post-formats' );

Swap out the name of the custom post type ‘reviews’ with the name of your own custom post type.

Add Post Formats to Pages

You’ll need to add this code in your functions file to display the post formats on Edit Page screens:

add_post_type_support( 'page', 'post-formats' );

Related Tutorials

  • Rename Post Formats In WordPress
  • Load Custom Single Post Template For Specific Post Format in Genesis
  • Exclude Post Format From Genesis Blog Post Template, Archives & Home Page
  • Post Format Archive Page for Specific Post Formats in Genesis

Reader Interactions

Comments

  1. Nathan Schmidt says

    July 22, 2014 at 2:37 pm

    Brad, if you want to take this a step further and customize the design-output of post format types, where is this done in a Genesis child theme? Would this be done in functions.php? I’ve been finding it difficult to find detailed documentation on this… most online tutorials show me how to add support for post format types, and with some I can update the little icons, such as the case w/ Genesis, but what if I want to change the entire layout of a custom post format type? Eliminate the title, post-meta, etc. in certain post format types while retaining that information for standard post format types? Just curious on what best practices are when handling this. I did find one tut on editing loop.php, but I’m not sure if this is suggested w/ Genesis as my framework, and I want to shy away from editing the parent theme if possible so updates do not wipe out my customizations.

    Log in to Reply
    • Brad Dalton says

      July 22, 2014 at 2:41 pm

      Hello Nathan

      You’ll need to code a custom template.

      I would start with the landing page template as an example and use the SP code Snippets.

      You can use the WordPress Template Hierarchy for naming the file.

      There are multiple examples of custom templates with code on this site.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.