• Hello,
    On the users page https://mydomain.com/wp-admin/users.php, only pages and posts are counted. I also need the posts of the user’s CPT to be counted.
    How do I do it? NO PLUGINS please.
    Please check the image:
    https://ibb.co/zS8HSnk

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can set up your own code. This is an example…

    https://wordpress.stackexchange.com/questions/160422/add-custom-column-to-users-admin-panel

    But remember that it will have to be done in your themes functions.php file, or you’ll have to create a new plugin to add that code to.

    Thread Starter mcamposs

    (@mcamposs)

    Excellent. Thank you very much.
    This code allows me to add as many custom fields as I want, but there is already a post field on that page, it just doesn’t count the posts from the user’s CPT.
    How to make the posts of the CPT counted in that same field? (Without adding a new field)

    That’s harder. Looking through the code quickly I can’t see anywhere that lets you filter that result, so I’d guess that you can’t get it set up like that without a lot of work. I’d recommend digging into the core code to see if you can find a filer that will work for what you want to do.

    Thread Starter mcamposs

    (@mcamposs)

    Okay I understand.
    Will it be possible to eliminate the post fields by default, for me to add my custom field?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Counting CPTs on user page’ is closed to new replies.