/ Published in: PHP
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $numeroposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE (post_status = 'publish' AND post_type = 'custom-post-type')"); // reemplazar "custom-post-type" por el slug del custom post type seleccionado echo $numeroposts; ?>
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)