Custom post type hierarchical loop in Homepage
From the look of your code, all you are doing is creating a nested list. If so, the easiest thing would be wp_list_pages. $args = array( ‘post_type’ => ‘cliente’, ‘post_status’ => ‘publish’, ‘author’ => $idutente, // must be comma separated list of IDs ); wp_list_pages($args); wp_list_pages only seems to work with ‘hierarchical’ => true,, but … Read more