Home Forums Plugin Support WP User Frontend Pro Multiple custom post types in Dashboard

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Gar 5 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6595

    Gar
    Participant
    Post count: 10

    Hey again,

    I read through the documentation but I haven't seen anything about being able to add multiple custom post types in the same dashboard. As it is now, I'm using:

    [wpuf_dashboard]
    [wpuf_dashboard post_type="reviews"]

    This displays both post types I'd like, but it repeats information such as “Gar's Dashboard” and the author bio field.

    Having both on separate pages isn't as intuitive as I'd like it. I'd like to use this tutorial to display which section a post belongs to (either “Posts” or “Reviews”):

    http://docs.wedevs.com/adding-columns-to-dashboard-table/

    Is this possible — and if not, would this be a feature that could be added to the core?

    #6598

    Tareq Hasan
    Keymaster
    Post count: 2831

    You could use filter like this to achieve this.

    #6600

    Gar
    Participant
    Post count: 10

    Perfect, thank you!

    For those that want to know: I used the tutorial in my post above to add a new column in the Dashboard. To display which type of post the user submitted, I added a “Hidden Field” to my forms and used these values:

    Meta Key: type_of_post
    Meta Value: Review

    Repeated the same for my other custom post types, changing only the Meta Value and leaving the key the same.

    Use this to display the type of post in your dashboard:

    echo get_post_meta( $post->ID, 'type_of_post', true );

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

The topic ‘Multiple custom post types in Dashboard’ is closed to new replies.