show content of one post inside another? single.php loop
-
Hi
I am trying to use the loop to show the content and extra field values of one post inside another post using an extra field to specify the ID of the post I want to include.
I can figure out the extra field bit’s but can’t get the loop to show the content of the other post.So inside my single.php I am adding the following if statement below where the_content etc:
<?
$otherPostID = get_post_meta($post->ID, otherPostID, true);
if ($otherPostID) { ?>show loop here and get the ID of the post to include from $otherPostID
<? } ?>
The if statement works fine if I add an id number to my extra field, I just can’t seem to manipulate the loop to get a specific posts content.
I have looked through the forum and can only seem to find solutions to list posts on archive pagesAny help would be much appreciated.
Mr M
- The topic ‘show content of one post inside another? single.php loop’ is closed to new replies.