Enable Genesis Layouts for All Custom Post Types

Community Forums Forums General Discussion Enable Genesis Layouts for All Custom Post Types

This topic is: not resolved

This topic contains 5 replies, has 3 voices, and was last updated by  jdingman 1 year, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6285

    digisavvy
    Participant
    Post count: 3

    I’d like to enable support of genesis layouts for ALL custom post types. I have the snippet below which will do it one CPT at a time provided I enter each CPT. Is there a way to write this to affect all Custom Post Types?

    <code>/**
    * add Genesis layout options to custom posts types
    *
    @author Brian Lis
    @link http://dev.studiopress.com/genesis-layout-options-for-custom-post-types.htm
    */

    add_post_type_support( ‘your_custom_post_type’, ‘genesis-layouts’ );</code>

    #6551

    nickthegeek
    Keymaster
    Post count: 756

    How are you registering the post types?

    #12083

    digisavvy
    Participant
    Post count: 3

    The post types are being registered with a 3rd party plugin. In this Case Types and Views

    #12188

    nickthegeek
    Keymaster
    Post count: 756

    that code can’t really be done to affect all post types. You may check with the plugin developer to see if the plugin can be setup to automatically include support for genesis_layouts.

    #12731

    digisavvy
    Participant
    Post count: 3

    I know this isn’t a place for coding support, so thank you for your help, Nick. But couldn’t use a conditional statement !is_single or something along those lines?

    #13859

    jdingman
    Participant
    Post count: 31

    @nick

    What about a single function to set a specific layout for a specific CPT?

    ie, if I have a CPT called “Themes” and I want all Posts under “Themes” to be set to the “full width” layout.  How would I do that?


    Learn more about Genesis.

    WordPress News, tips, and tricks – WPForce.com

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.