programmatically insert child post into Wordpress programmatically insert child post into Wordpress wordpress wordpress

programmatically insert child post into Wordpress


Check the documentation - get_posts() takes an argument of category, which is the category ID. The category_name argument is used on a different function, query_posts().

To find the category ID, hover over the link to it on the WP categories backend.