Number of invoices show on a public profile

This topic contains 2 replies, has 3 voices, and was last updated by  Patrik 4 days, 21 hours ago.

  • Author
    Posts
  • #3777

    Sharon
    Free User
    Post count: 16

    The number of invoices show next to the number of listings in a user profile page. How do I hide this? See attached.

    It’s not necessary for the public to know how many invoices is associated to a user so why does it appear on a profile? That information should be kept private. It appears above the user tabs and next to the user profile pic when using UsersWP. I am using V2 of GeoDirectory and all extensions and themes are, for the most part, by GeoDirectory.

    Thank you,
    Sharon

    Attachments:
    You must be logged in to view attached files.
    #3779

    Alex Rollin
    Moderator
    Post count: 22938

    Hello,

    The developers will look into providing methods to hide individual counts in a future version.

    To hide the row of counts use this CSS:

    
    li.list-group-item.border-0.m-0.p-0.bg-transparent.uwp-profile-post-counts {
        display: none;
    }
    
    #3810

    Patrik
    Moderator
    Post count: 1531

    Hi,

    You can hide “Invoices” from the list using the following code:

    add_filter('uwp_get_user_post_counts', 'uwp_get_user_post_counts_cb', 10, 2);
    function uwp_get_user_post_counts_cb($counts, $post_types){
        if(isset($counts['wpi_invoice'])) {
    	    unset($counts['wpi_invoice']);
        }
    
        return $counts;
    }

    Put this code in the currently active theme’s functions.php file or use snippets plugin to add the code from admin side and let me know if it resolves the issue or not.

    Regards,
    Patrik

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

You must be logged in to reply to this topic.