List multiple custom post types

This topic contains 2 reply and 2 voices, and was last updated by madegood 11 years, 6 months ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
May 20, 2013 at 10:21 am 3865
madegood Hi, I want to list multiple custom post types in a single list on the user dashboard page. Please can you tell me how to do this. I assumed there might be an action hook or filter, but couldn't see one. -- OR -- could you tell me how to build an 'edit page' and 'delete page' link so I can build my own dashboard page from scratch. Thanks!
May 22, 2013 at 5:20 am 3954
Tareq Hasan Tareq Hasan

Sorry for replying late, here’s how you can do that:

[php]
function wpufe_dashboard_query( $args ) {
$args[‘post_type’] = array( ‘post’, ‘custom_post’, ‘another_one’ );

return $args;
}

add_filter( ‘wpuf_dashboard_query’, ‘wpufe_dashboard_query’ );
[/php]

Add this snippet to your themes functions.php and give the correct post type in that function.

May 22, 2013 at 10:38 am 3992
madegood madegood

Thanks!

Viewing 2 Posts - 1 through 2 (of 2 total)