inserting content of 1 Post to in another with a template hierarchy
Yes, get_page_by_path() will return a post object or array on success, and not the post ID. $faq_post = get_page_by_path( $post_slug, OBJECT, ‘land’ ); // object $faq_post = get_page_by_path( $post_slug, ARRAY_A, ‘land’ ); // array So there is no need to make the custom new WP_Query call, and your code below is good: $faq_post = get_page_by_path( … Read more