/ Published in: PHP

Función php para mostrar el número total de entradas o post de una determinada categorÃa en WordPress
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function numero_total_post($idcat) { global $wpdb; $query = "SELECT count FROM $wpdb->term_taxonomy WHERE term_id = $idcat"; $numero = $wpdb->get_col($query); echo $numero[0]; }
URL: http://www.bufa.es/wordpress-numero-total-post-categoria/
Comments
