I am trying to build a query for a hierarchical custom post type and I want to display only parent posts (Exclude Children).

The following is a simple query I added to displaying everything first, but it doesn’t work to begin with.


“post_status” => “publish”,
“orderby” => “date”,
“order” => “DESC”,
“posts_per_page” => -1
); ?>


Read more here: Display posts of a hierarchical custom post type excluding parent posts


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: