I'm trying to display the content of one page (id 1705) within another (id 1866).
I used the "fields and views" button to put this in the body of 1866: [wpv-post-body view_template="None" item="1705"]
When I view the page, I see this error message: Content not displayed because it produces an infinite loop.
The wpv-post-body shortcode was called more than once with the attribute view_template="None" over the post "Meeting Room Policy", triggering an infinite loop.
What do I need to do differently?
Hi, usually this indicates that the post body for post 1705 contains a wpv-post-body shortcode to display its own contents, or the Content Template assigned to post 1866 contains a wpv-post-body shortcode with no specified item. Either would trigger an infinite loop in this case. Can you check both of those possibilities and let me know what you find out?
Hi Christian, thanks for the reply. The content template assigned to both pages does indeed have this shortcode in it: [wpv-post-body view_template="None"]. I do always want the page template to pull in the content of the current page, which is what that's intended to do, but in this particular case, I also want to embed the body content of another page within it. Is there a better way to do that?
There's not really a good way to do that with the post body when a Content Template that contains view_template="None" is applied to both posts. You could add a WYSIWYG custom field to the post and display the field in your content template(s) instead. That's probably the most straight forward way without utilizing custom code. Let me know if you have questions about that.
I don't want to add a new field just for this one instance, so I'm just going to copy / paste the content from the one page into the other. Wish there was a way to specify in the template that the post body should be pulled from the current post so this issue could be avoided, but this will work for now. Thanks for your help!