Total number of JPG images, GIF, PNG in media libraries
To display the number of pages on the user side, I found the code, maybe it will be useful for someone. Just add this code snippet to function.php.
function img_count(){
$query_img_args = array(
'post_type' => 'attachment',
'post_mime_type' =>array(
'jpg|jpeg|jpe' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png',
),
'post_status' => 'inherit',
'posts_per_page' => -1,
);
$query_img = new WP_Query( $query_img_args );
echo $query_img->post_count;
}The second part of the code is needed to indicate the location, where to output number of images from media library.
img_count(); ?>
/*

Online tutoring services. List of courses I teach
*/- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.




