Getting content from a referenced post
Function get_the_content doesn’t take post_ID as param. It has 2 params: $more_link_text – (string) (optional) Content for when there is more text. $stripteaser – (boolean) (optional) Strip teaser content before the more text. So you can’t use it as in your code get_the_content( $p->ID ); – this will get content of current post and use … Read more