79677188

Date: 2025-06-24 07:48:30
Score: 1
Natty:
Report link

I think post_types "any" should get you there. Thanks @Yzkodot for the largely complete answer.

$args = array(
    'posts_per_page'   => -1,
    'paged'            => 0,
    'orderby'          => 'post_date',
    'order'            => 'DESC',
    'post_status'      => array('publish', 'inherit'),
    /** add 'any' to get any type of post. This might return some post_types you don't want though. **/
    'post_type'        => 'any',
    'post_author'      => 3
);

$posts_array = get_posts($args); 

$s_count = count($posts_array);

echo $s_count;
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Yzkodot
  • Low reputation (0.5):
Posted by: Frizzant