• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Transfer CPT's from Thesis to Metro-Pro

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Transfer CPT's from Thesis to Metro-Pro

This topic is: not resolved

Tagged: custom post types

  • This topic has 1 reply, 2 voices, and was last updated 10 years, 10 months ago by Robin.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • August 8, 2014 at 1:29 pm #117807
    Elaine Griffin
    Member

    Hello,
    I'm trying to transfer some CPT's created in Thesis to my customization of Metro-Pro.
    I know very little about CPT's, so this has been challenging. The client does not plan to use the CPT's anymore, but she wants to keep them because she has so many links out there.
    This is the code from Thesis:

    /* Custom Post Type */
    	add_filter('thesis_show_headline_area', 'aside_headline');
    	add_filter('request', 'main_feed_additions');
    	add_filter('pre_get_posts', 'cpts_in_queries' );
    /*
    	add_action('thesis_hook_content_box_top','aside_callout');
    	remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample');
    	add_action('thesis_hook_custom_template', 'aside_list');
    */
    	add_action('thesis_hook_custom_template', 'britt_email_list');

    And this is what I have found and tried to modify:

    /** Add Custom Post Types */
     
    add_action( 'init', 'create_post_type' );
    function create_post_type() {
    register_post_type( 'aside_headline',
    array(
    'labels' => array(
    'name' => __( 'Asides' ),
    'singular_name' => __( 'Aside' )
    ),
    'public' => true,
    'has_archive' => true,
    'rewrite' => array('slug' => 'asides'),
    )
    );
    }
    /**
    * 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( 'asides', 'genesis-layouts' );

    Any direction here would be greatly appreciated!

    http://www.brittanyherself.com
    August 9, 2014 at 10:33 am #117924
    Robin
    Member

    Elaine, you've gotten a good start in moving the CPT registration over, although your add_post_type_support is unnecessary, as that could be incorporated into the CPT creation function above. Here's a nifty CPT Generator tool, which is more than you really need, but can help you organize a bit and see where to add support for things like the Genesis Layouts, etc.

    That first batch of lines looks like it's all affecting output, either the query itself, or the appearance, although you'd need to dig out the actual functions to see what it is they're doing. And if you want to keep what they're doing, you would need to replace the Thesis hooks with either WP ones or Genesis ones, depending on what you're doing. For instance, thesis_hook_content_box_top could correspond to genesis_before_entry, but that's just a guess. Here's a great Genesis hooks reference, if that helps.

    Hope that helps you get started, at least. Good luck!


    I do the best I can with what I’ve got. (say hey on twitter)

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble