Created
May 28, 2021 06:41
-
-
Save flabernardez/49ad77762529f842460b55a483dd1a90 to your computer and use it in GitHub Desktop.
#wordpress #php args to display only childs from a post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$args = array( | |
'orderby' => 'date', | |
'order' => 'DESC', | |
'post_type' => 'city-guide', | |
'posts_per_page' => 36, | |
'paged' => $paged, | |
'post_parent__not_in' => array(0) | |
); | |
// see in https://stackoverflow.com/questions/35346352/exclude-parent-posts-and-display-only-child-posts-in-archive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment