/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php #exclude children category $get_childs = get_categories('child_of='.$cat); $q_cat = "cat=$cat"; foreach ($get_childs as $cat_child) { $q_cat .= ",-$cat_child->cat_ID"; } $query = new WP_Query($q_cat); ?>
URL: pokrovskii.com