Get the count of child pages in WordPress function has_children($post_id) { $pages = get_pages('child_of=' . $post_id); return count($pages); }
Post a Comment