0

I'm using Wordpress Magazine Style Theme (http://wordpress.org/themes/magazine-style) which doesn't have any other than default post format set (no galleries, aside, etc.).

I would like to create a child theme that would have custom post types added via register_post_type() function.

In childtheme folder I created files:

  • style.css with import rule
  • functions.php

According to Codex (http://codex.wordpress.org/Post_Types) I've added in functions.php:

<?php
add_action( 'init', 'create_post_type' );
function create_post_type() {
    register_post_type( 'acme_product',
        array(
            'labels' => array(
                'name' => __( 'Products' ),
                'singular_name' => __( 'Product' )
            ),
        'public' => true,
        'has_archive' => true,
        )
    );
}
?>

But I can't see the new Product post type while creating a new post (there is no "Format" menu).

What else I have to do to enable custom post types in child theme?

0

Creating a new CPT adds a dedicated admin menu for managing posts of that type, not a new post format. Those are two different concepts, post format is used to add some meta information on the content of a single post while CPTs are used to create different classes of posts.

  • Could be worth mentioning that post formats cannot be removed or added by plugins or themes. codex.wordpress.org/Post_Formats – Andrew Bartel Dec 14 '13 at 7:12
  • @AndrewBartel, why don't you make an answer out of that info? I was just trying to make mine be more then one sentence.... – Mark Kaplun Dec 14 '13 at 10:07
  • I feel you answered the question just fine, the main point imo was that the two were totally different concepts, I just wanted to add to it in case the OP was hoping to manage the formats. – Andrew Bartel Dec 14 '13 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.