Display posts of a hierarchical custom post type excluding parent posts

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.

$

“products”,
“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

Leave a Reply

Your email address will not be published. Required fields are marked *