Content - page builder conflict

I want to show the content of a post in a loop (<Field content />) but it’s conflicting with my page builder:

  • Page - has template using page builder
    – loop inside page builder - is pulling acf_relationship linking to a cpt Feature Requests
    – the <Field content /> comes from the Feature Requests linked. ACF, Title, and Link works fine.

But if I use the <Field content />, then the Page Builder template gets applied to that content.

Using Brizy. I’ll take a closer look at it tomorrow - but wanted to know if there’s a way to just get the content totally stripped, rather than have any html associated or wrapped around it?

Webinars – The Station - here it is going all whack.

What it ought to look like:

Hi Alex,
Could you share your template markup? I’d like to try this on my end and see if I can replicate the bug with the content tag you’re encountering

<center><span class="h1 lowercase">all <Field title /> features</span></center>
<br><br>
<div class="flex flex-wrap" style="max-width:800px; margin: auto;">
  <Loop type=cpt_feature_requests taxonomy=request_category terms="{Field connections}" taxonomy_relation="and" taxonomy_2="request_type" terms_2="subfeature">
    <div class="flex flex-row"> 
      <div class="image" ><div class="icon back1 color8">
        <i class="fa-thin fa-{Field fa_icon}" style="font-size:65px;  text-align:center; margin:auto;" hide_empty=true></i></div>
      </div>
      <div class="content flex flex-column padding-m">
        <If field="jck_sfr_status" is value="planned"><div class="abovetitle badge back6 color2"><Field jck_sfr_status /></div></If>
        <If field="jck_sfr_status" is value="pending"><div class="abovetitle badge back6 color2"><Field jck_sfr_status /></div></If>
        <If field="jck_sfr_status" is value="publish"><div class="abovetitle badge back4 color8"><Field jck_sfr_status /></div></If>
        <If field="jck_sfr_status" is value="completed"><div class="abovetitle badge back1 color8"><Field jck_sfr_status /></div></If>
        <If field="jck_sfr_status" is value="under-review"><div class="abovetitle badge back6 color2"><Field jck_sfr_status /></div></If>
        <If field="jck_sfr_status" is value="started"><div class="abovetitle badge back1 color8"><Field jck_sfr_status /></div></If>
        <If field="jck_sfr_status" is value="beta-launched"><div class="abovetitle badge back5 color8"><Field jck_sfr_status /></div></If>
        <a href="{Field url}" alt="{Field title}">
          <span class="h2 lowercase color1" ><Field title /></span>
          <hr>
          
          <span class="lowercase color7" style="font-weight:400;">
            <Field content />
          </span>
        </a>
      </div>
    </div> <br>
  </Loop>
</div>

Hi, have you had any progress in trying to replicate this, and how to solve it?

Hey Alex, I haven’t taken a particularly deep look at your specific problem here, but I thought I’d chime in because a recent update included a feature to strip HTML tags from things. Maybe this could work for you.

<Format remove_html><Field content /></Format>

Thanks! Great feature - not what I needed, but great to narrow down what’s actually happening!

So here’s what the loop is doing:

It’s on a page that has a text field to write the taxonomies.
The loop calls a CPT filtered by those taxonomies and another parameter. That works great.

I want to pull the CPT content - and what seems to happen is it pulls the Page content - the page the loop is on. When I pull an ACF field of the CPT, that works fine too.

Ohhh… ok, so I think I know what’s happening. The loop shortcode is on a Brizy template which is applied to the pages. So the Loop thinks “content” is the template page it’s on, rather than the page the template is loading on… Does that make sense?

So how can I have the loop understand it needs to pull from current page, and not the template it’s in?

When you’re testing out your template, are you viewing it while you’re inside the Brizy template preview or are you viewing it using an actual page where the template is applied? I’ve heard of this happening to other users when they were creating templates using their page builder’s theme-building tools (like Beaver Themer) where the L&L loop would display data about the template and not about the previewed post or page. This makes sense because L&L generally uses the standard wp_query of the current page to understand the context of the current page and display data about it. If Brizy templates behave similarly to templates in Beaver Themer, the default query might be related to the template itself so that’s why data might get displayed from it.

When I’ve seen this issue arise among other users, everything worked as expected when they were browsing content on the front end and L&L would get its context from the current page since Beaver Themer templates didn’t modify the underlying wp_query of the page. It was just in the preview where things didn’t work as expected. If that’s not the case for you, maybe Brizy is unique in how it handle’s a page’s default query when applying a Brizy template to it. Does this behaviour still happen if you manually place the L&L template on a page instead of placing it in a Brizy template? Unfortunately, since Brizy isn’t one of the builders we’re officially supporting in the free version of the plugin just yet, I don’t think the devs would make a customization specifically for this builder at the moment.

It’s not just visible during preview, but on front-end.

When inserted in a regular page built by brizy directly, without an assigned template, the loop works fine because it’s pulling from the page it’s embedded in and ignores the brizy code.

So to clarify, this is dependent on how Brizy is handling the wp_query?

We can’t easily confirm without doing a deep-dive into Brizy (which we can’t promise we’ll get around to). L&L is generally quite good at figuring out the correct context when plugins aren’t interfering, so chances are Brizy is interfering somehow.