WordPress.org

Forums

comment admin for custom post types (3 posts)

  1. Matzze
    Member
    Posted 2 years ago #

    Hi there,

    I registered a custom post type with option to comment:

    $args = array(
    				'labels' => $labels,
    				'public' => true,
    				'publicly_queryable' => true,
    				'show_ui' => true,
    				'query_var' => true,
    				'menu_icon' => null,
    				'rewrite' => array('slug' => __('mycpt', 'mycpt')),
    				'capability_type' => 'post',
    				'hierarchical' => false,
    				'menu_position' => null,
    				'supports' => array(
    									'title',
    									'editor',
    									'comments'
    									)
    				);
    
    	register_post_type( 'mycpt' , $args );

    So it's commentable. Works fine in front end.

    But the posted comments are not shown in admin under "comments". They exist and i can find them in db via phpmyadmin, but for some unknown reasons they are not listed in the admin. Is there an option for "dont show comments related to a custom post type" or something like this?

    thx

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    Sorry... totally misread your code

  3. Matzze
    Member
    Posted 2 years ago #

    sorry, the only relevant part is the support => array ('comments') part, just for showing how i registered comments for my custom post type.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.