如何使用调用自定义帖子类型WP_Query
?
这是我的自定义帖子类型。如何在代码中显示它?
<?php
// Hooking up our function to theme setup
add_action( \'init\', \'create_post_type\' );
add_theme_support(\'post-thumbnails\');
function setup_types() {
register_post_type(\'mytype\', array(
\'label\' => __(\'My type\'),
\'supports\' => array( \'title\', \'editor\', \'thumbnail\', \'revisions\' ),
\'show_ui\' => true,
));
}
add_action(\'init\', \'setup_types\');
?>