user4226599
user4226599

Reputation:

Post Formats in Wordpress

I want to display all post format (let's say: aside) in all custom post type. In WordPress to display all posts of a certain category, just need to use this URL: mysite.com/category/mycategory.

Upvotes: 1

Views: 76

Answers (1)

Tristup
Tristup

Reputation: 3673

In Supports you need to include 'post_format' to get it done.

    $args = array(
    'labels'                => $labels,
    'public'                => true,
    'publicly_queryable'    => true,
    'show_ui'               => true,
    'query_var'             => true,
    'rewrite'               => apply_filters( 'et_portfolio_posttype_rewrite_args', array( 'slug' => 'testimonial', 'with_front' => false ) ),
    'capability_type'       => 'post',
    'hierarchical'          => false,
    'menu_position'         => null,
    'supports'              => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments', 'revisions'  )
);

register_post_type( 'testimonial' , $args );

Upvotes: 1

Related Questions