Skip to content

Instantly share code, notes, and snippets.

@flegfleg
Created May 11, 2014 13:39
Show Gist options
  • Save flegfleg/664f24ff44997781a9d3 to your computer and use it in GitHub Desktop.
Save flegfleg/664f24ff44997781a9d3 to your computer and use it in GitHub Desktop.
use 'post_parent' => 0 in WP_Query to return only parent posts
$slider_query = new WP_Query( array( 'post_type' => 'wlw_projekte', 'orderby' => 'menu_order title', 'order' => 'DESC', 'post_parent' => 0 ));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment