Home Forums Plugin Support WP User Frontend Pro Custom Post type support in dashboard

This topic is: resolved

This topic contains 7 replies, has 3 voices, and was last updated by  docandtee 5 years, 9 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #5579

    docandtee
    Participant
    Post count: 25

    Hell again
    I recently posted a question asking if it is possible to add more than one custom post type to the dashboard.

    I was given this code, which does work:

    function wpufe_dashboard_post_type( $args ) {
        $args['post_type'] = array( 'independentartist', 'representedartist', 'artistgallery', 'artistcommission', 'artistvideo', 'artistblog' );
     
        return $args;
    }
     
    add_filter( 'wpuf_dashboard_query', 'wpufe_dashboard_post_type' );

    However, this just lists all of the user posts as ‘posts'. Is there any way to break this down so that the user can see how many posts they have added for each custom post type?

    Many thanks

    #5604

    Tareq Hasan
    Keymaster
    Post count: 2831

    Sorry, there isn't a way other than creating your own dashboard.

    #7633

    docandtee
    Participant
    Post count: 25

    Hi Tareq
    Sorry for re-opening this thread after a nearly two months!
    I've decided that I really do need to separate out the custom post types in the dashboard.
    In your last reply you mentioned that the only way to do this would be to create my own dashboard.
    Can you point me in the direction of how I might go about doing this please?
    Apart from this one niggle your plugin is spot on!

    Cheers

    D

    #7635

    Tareq Hasan
    Keymaster
    Post count: 2831

    You said you just need to show the count of each post type he has created, right? That's the only change I can see you are asking for?

    #7636

    nonameolsson
    Participant
    Post count: 10

    I am doing a similar thing. But I'm using jQuery FooTables or DataTables to be able to sort and filter them out. Could that be a way to do it?

    #7639

    docandtee
    Participant
    Post count: 25

    Hi Tareq
    Sorry I wasn't clear enough in my original question.
    What I actually want to do is break down the dashboard table into post type sections.
    Like this:

    Custom Post Type Video Posts:
    video post 1 – edit
    video post 2 – edit

    Custom Post Type Gallery Posts:
    gallery post 1 – edit
    gallery post 2 – edit

    etc etc.

    At the moment it just lists all the different custom posts together in one long table so you can't see what post type each post is.

    Does that make sense?

    Thanks

    D

    #7640

    Tareq Hasan
    Keymaster
    Post count: 2831

    @nonameolsson Nope, he is not asking that.

    @docandtee, may be you can use multiple dashboard shortcodes for different post types in a single page. That should do.

    #7987

    docandtee
    Participant
    Post count: 25

    Hi Tareq
    Yes, I went for similar approach in the end. I've set up multiple pages and a menu for each dashboard to navigate between views for different post types. Don't know why I didn't think of this before!

    Thanks

    D

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Custom Post type support in dashboard’ is closed to new replies.