Categories
Plugins WP User Frontend

How to show all the posts submitted by all users in a page

To show all the posts submitted by all users in a page, follow the instructions given here.

1) Create a new page, insert [wpuf_dashboard] shortcode in that page & Publish it.

Refer Screenshot:
http://prntscr.com/egiu0w

2) Add the following code inside the theme’s functions.php file.

To show all the posts submitted by all users in a page, follow the instructions given here.

1) Create a new page, insert [wpuf_dashboard] shortcode in that page & Publish it.

Refer Screenshot:
http://prntscr.com/egiu0w

2) Add the following code inside the theme’s functions.php file.

Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact me for assistance.
function show_all_posts_for_admin( $args  ) {

    if ( current_user_can( 'administrator' ) ) {
        unset($args['author']);
        return $args;
    }else {
        return $args;
    }

}

add_filter( 'wpuf_dashboard_query', 'show_all_posts_for_admin' );

Now, logged in from multiple users account & submit posts using frontend form, check the page you created on the frontend. You can see all the posts submitted by all users on that page.

By Mahbubur Rahman

Self Taught Programmer And Learning Enthusiast

Leave a Reply

Your email address will not be published. Required fields are marked *