Home Forums Plugin Support WP User Frontend Pro [wpuf_dashboard] not showing private posts

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  ronilagin 6 years, 1 month ago.

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

    ronilagin
    Participant
    Post count: 24

    Hello,

    I added some code to my functions that sets my custom-post-type posts to automatically be set to private.  I think there was an option for this in the plugin but it wasn't really working for me.  Now that I've done this none of the posts created are showing up on my [wpuf_dashboard] page.  Any way to address this?

    #1691

    Tareq Hasan
    Keymaster
    Post count: 2831

    Currently specifically draft, future, pending and publish post statuses are fetched.

    To be able to modify the dashboard query change the line $dashboard_query = new WP_Query( $args ); to $dashboard_query = new WP_Query( apply_filters( 'wpuf_dashboard_query', $args ) );. So you would be able to filter the dashboard query with the wpuf_dashboard_query filter. This filter will be added in a future release, so it'll be safe.

    Another problem you'll have if you have private post status, that will be the post status column. It won't show the private post status. So edit with your own risk, possibility to be removed with an update.

    You could also change the wpuf_show_post_status function from:
    [php]echo ‘<span style="color:' . $fontcolor . ‘;">' . $title . ‘</span>';[/php]
    to
    [php]$show_status = ‘<span style="color:' . $fontcolor . ‘;">' . $title . ‘</span>';
    echo apply_filters( ‘wpuf_show_post_status', $show_status, $status );[/php]

    #1696

    ronilagin
    Participant
    Post count: 24

    You're awesome, thanks so much.

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

The topic ‘[wpuf_dashboard] not showing private posts’ is closed to new replies.