Display Custom Post Type Archive content with Shortcode

Most probably you need a bunch of divs etc duplicated in both archive-custom.php and the shortcode. Identify those divs, and move them into a new template file in your theme, e.g. in part-archive-custom.php. Then, delete them from archive-custom.php and add a call to get_template_part(‘part-archive-custom’); instead. Do the same inside your shortcode.

How to display grandchildren only of custom post?

Solved my own question after further research and testing 🙂 Ended up using 2 queries passing the result from one query to the other. Hope this helps someone. $argsIssues = array( ‘post_type’ => ‘magazine’, ‘post_parent__in’ => array(20321), //get issue(children) posts from the issues(parent) ‘fields’ => ‘ids’ //query only the postIDs ); $q = get_posts( $argsIssues … Read more