This topic contains 6 reply and 2 voices, and was last updated by towhid 4 years, 11 months ago
Viewing 6 Posts - 1 through 6 (of 6 total)
Author Posts
November 30, 2014 at 8:00 pm 31433
towhid In the user listing addon the post type items show all posts and not just the ones submitted by the user. Please update this so it only shows posts published by the user in the user listing.
December 1, 2014 at 11:00 am 31452
towhid towhid

Hello Scott,

Can you please give me any hints where you get the all post option in User listing addon? Basically User Listing addon is use for show all user listing. If you give me hints I will work for it.

Thank You 🙂

December 1, 2014 at 5:23 pm 31488
Scott Scott

/wp-admin/admin.php?page=wpuf_userlisting

Add a post type item and select your post type from the item dropdown. You will see it shows all posts regardless of the author.

In the user listing we would want it to only show the users posts.

December 2, 2014 at 1:07 pm 31590
towhid towhid

Hello

Please open wp-content/plugins/wedevs-wpuf-profile-field/userlisting.php and try to find

$args = array(
    		'post_author' 		=> $user_id,
    		'post_type' 		=> $post_type,
    		'posts_per_page' 	=> $post_count,
    		'post_status' 		=> 'publish',
    		'orderby'          	=> 'post_date',
    		'order' 		=> 'DESC'
    	);

replace with

$args = array(
    		'author' 	        => $user_id,
    		'post_type' 		=> $post_type,
    		'posts_per_page' 	=> $post_count,
    		'post_status' 		=> 'publish',
    		'orderby'          	=> 'post_date',
    		'order' 		=> 'DESC'
    	);

Please let me know the result. I am here to help you.

Thank You 🙂

December 3, 2014 at 12:14 am 31650
Scott Scott

This does work! This should be updated in the add-on code as this is how this should work out of the box.

Thanks

December 22, 2014 at 4:03 am 32769
Scott Scott

Can this please be added to the next update so that I do not have to keep updating your code?

Thanks

December 22, 2014 at 11:36 am 32795
towhid towhid

Hello Scott,

Glad to know that it solves your problem. Hope in next release you will get the fix.

Thank You 🙂

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