Skip Navigation

Content Template Cell for another post in Content Layouts is showing the wrong data and an error message

Resolved

Reported for: Toolset Layouts 2.2

Resolved in: 2.4.3

Symptoms

When you style a post with a Content Layout and add a Content Template Cell that “Displays content for a specific page” which in turn calls the post body, you will see the following front-end 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=”content-template-for-layout-for-page-2-layout” over the post “Add user”, triggering an infinite loop.”

Other shortcodes like wpv-post-title will fallback to the current post currently being displayed.

Workaround

You can use one of the following workarounds:

  • Insert the shortcodes using Visual Editor cells and passing an id= attribute.
  • Stop editing this content with Layouts, but keep the layouts design, and manually add the id parameter to the wpv-post-body shortcode in the native post editor .

Example:

<div class="container-fluid ">
<div class="ddl-full-width-row row ">
<div class="col-sm-12 ">[wpv-post-body view_template="content-template-for-layout-for-post-24-layout"] </div>
</div>
</div>

Same example with the added id (according to your Post ID):

<div class="container-fluid ">
<div class="ddl-full-width-row row ">
<div class="col-sm-12 ">[wpv-post-body view_template="content-template-for-layout-for-post-24-layout" id="2"]</div>
</div>
</div>

Comments are closed