Home Forums Plugin Support WP User Frontend Pro User Listing Addon Issues

This topic is: resolved

This topic contains 6 replies, has 2 voices, and was last updated by  towhid 4 years, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #31433

    Scott
    Member
    Post count: 48

    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.

    #31452

    towhid
    Participant
    Post count: 4505

    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 ๐Ÿ™‚

    #31488

    Scott
    Member
    Post count: 48

    /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.

    #31590

    towhid
    Participant
    Post count: 4505

    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 ๐Ÿ™‚

    #31650

    Scott
    Member
    Post count: 48

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

    Thanks

    #32769

    Scott
    Member
    Post count: 48

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

    Thanks

    #32795

    towhid
    Participant
    Post count: 4505

    Hello Scott,

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

    Thank You ๐Ÿ™‚

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

The topic ‘User Listing Addon Issues’ is closed to new replies.