For the above function this would work:
$children = get_all_subpages($cat_id, $args, OBJECT);
foreach ($children as $post) {
echo $post->guid;
echo $post->post_title;
}
Related Posts:
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- How can I save an array from a random post sequence for later use?
- Include current post into loop
- Repeat array inside array through while loop
- Iterate through ID’s in loop
- Issue with WP_Query (need a array of selected ID’s)
- Can I force WP_Query to return no results?
- Multiple WP_Query loops with Pagination
- WP_Query and next_posts_link
- Order posts by ID in the given order
- Get array of posts from the current archive page loop
- Get the number of posts from the current page results
- How to place a loop within another loop?
- In loop: posts have thumbnail AND other variables
- How to order category.php loop by ‘meta_value’?
- Pagination/infinite scroll with WP_Query and multiple loops
- Add inline HTML to posts published within last 24hrs
- Move posts to top of WP_Query if in certain Taxonomy?
- Display different number of posts from one category on the different pages
- WP Meta Query for some meta (array) values
- Pagination not working Search posts
- How to change a custom query into a standard loop?
- Can certain (site-crashing) limitations on WP_Query in shortcode be overcome?
- Implementing an OR statement to wordpress wp_query
- Get List of all the Authors
- 2 loops on page – one with orderby rand second orderby date
- WP_Query loop within WP_Query loop
- Refine search results using WP_Query
- How to pass many ids in post__in?
- How to show subcategories using loop?
- Minimize database queries to user tables?
- Counter problem, infinite loop when post_per_page equals X
- Sub-loop / nested loops Best Practices
- (Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array
- Show Sticky Post at the top but do not show again in the loop?
- Any number in meta key (wp query)
- How to get all unique categories for posts in loop?
- How do I run through a WordPress loop called from a filter function?
- How do I get the title of a category in a custom loop?
- Using the_post_thumbnail resets current loop item ID
- How to list custom fields as headers and list all pages sharing that custom field under it?
- Out Of memory issue on post per page parameter
- Check if loop has any categories?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- Change query from cat id to slug or name?
- Using Wp_Query without the loop?
- Removing duplicate values between two wordpress queries
- Issue with front page navigation after upgrading to 3.4
- Custom WP_Query id
- Assign custom parameter to each post in query
- Exclude recently updated post from custom WP_Query using multiple loops
- get_posts output always same post
- How to use WP_Query() on single.php?
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Loop increase in while loop not working
- How does WP generate the default $query in WP_Query based on the URL?
- how to get category`s slug in WP_Query loop?
- How to remove only the latest sticky post from the loop
- How I can repeat 2 HTML templates in a WordPress Query?
- WP_Query with page_ids in arguments without a result
- Does putting queries within loops cause an issue on WordPress?
- Query using string from custom field as array value
- Category based on post id
- Offset WP_Query by negative 1
- WP_Query orderby random do not repeat infinite scroll – one loop
- Advise on Templates for Custom Queries
- meta_query returning excluded result
- Query WP Page for Buddypress Group Home [closed]
- $post in wp_query?
- How to pass the current content of $wp_query to a new page?
- How to separate two columns from one content on a page template?
- Counting instances of words in the results of a post query
- WP Query by 4 different taxonomies
- Can I alter the main loop to ‘orderby’ a custom callback?
- WooCommerce | AJAX | Product Pagination | Help me implement Ajax Pagination
- Avoid removing duplicate posts
- how to get custom attachment url?
- Display posts side by side with custom query
- WP_Query & Duplicate entries
- WordPress For Loop Prints Unwanted Extra Paragraph Element
- Calling a function with WP_Query only ever brings the first result
- query_posts() doesn’t seem to be called in my page
- Some doubts about how the main query and the custom query works in this custom theme?
- Create multiple sections for all categories and then queries all the posts for each of those categories
- wp_query – Modify $query to include duplicate content
- How to get several fields from wp_query?
- Load 3 posts in flexslider slide [closed]
- Multiple wp_query loops showing first 5 posts on all pages instead of older posts[Resolved]
- WP Query posts__in not working with array
- Next / previous posts link doesn’t show up with Posts 2 Posts
- How to exclude posts ordered by comment_count from subsequent wordpress loops using WP_Query?
- $query conflicting with other queries in the same page
- WordPress Post Looping? [duplicate]
- Carousel Loop only duplicating
- How to show featured post first, then separate loop for other posts
- posts_per_page – Repeats only first posts ‘post__in’ array
- Woocommerce set loop_shop_columns to be 3 in the main shop page loop only and 4 otherwise
- Prevent WordPress loop from displaying similar post titles
- Custom WordPress loop, articles not in same order as Array