Display total number of PDF files in your media library


function pdf_count(){ $query_pdf_args = array( 'post_type' => 'attachment', 'post_mime_type' =>'application/pdf', 'post_status' => 'inherit', 'posts_per_page' => -1, ); $query_pdf = new WP_Query( $query_pdf_args ); echo $query_pdf->post_count; } PHP

Visit wpsnipp.com for details on how to setup this WordPress snippet.

Share this post. Facebook | StumbleUpon | Delicious | Tweet It | Digg This | DesignBump-It | DesignPoke-it

Daily Email Newsletters

Weekly Email Newsletters

Subscribe to receive the latest design and creative business news, tutorials, and resources delivered to you via email—either daily (below) or weekly, to your computer, tablet, or mobile phone.

IMPORTANT NOTE: The newsletters and subscription confirmation email will be sent from the address briefing@iampariah.com. Please be sure to whitelist that address in your anti-spam filters. Check your Junk Mail or Spam folder if you miss an email prior to whitelisting briefing@iampariah.com.

Privacy and CAN-SPAM Compliance

All Pariah Burke newsletters comply with the U.S. CAN-SPAM Act. The newsletter even uses a third-party ESP to audit and ensure its compliance with CAN-SPAM. And your privacy is assured: your email address and other information will never be sold or given away.