Template shortcode in Beaver Builder Posts module (posts loop)


I have an issue with a L&L Template shortcode in a Beaver Builder Posts module: the L&L Template doesn’t grab the first post in the module’s loop but the current post instead (the post hosting the BB Posts module).

Here’s my setup:

  • A BB Posts module in a CPT Post template (made with Beaver Themer): it loops through posts related to the current post by Taxonomy
  • A custom layout in the Posts module with a L&L template shortcode inside
  • The L&L Template contains a simple <Field title />

As an example, the current post is named Post A.
Post A is related to Post B and Post C
So, the BB Posts module displays a 2 posts grid:

  • Post B
  • Post C

The problem is L&L <Field title /> returns the following values in the grid:

  • Post A (the current post), instead of Post B
  • Post C

Any hint about this issue please?

Following: i made a custom shortcode and it also outputs the current Post title at first position in the grid.
So, maybe the problem is more with the BB Posts module loop, maybe because it excludes the current post…

Update: after a few tests, i can confirm the issue comes from Loops & Logic alright.
Once L&L plugin disabled, the custom shortcode (or CCS) returns the correct title for the first post in the grid, and not the current Post title.

To be more specific, it’s not L&L that triggers the issue described above but the L&L template.
L&L plugin enabled, when i disable the template shortcode in the BB Posts module’s custom layout, the issue disappears.

Check out Tag in attribute in the docs and maybe replace < with {

For some reason I’m not allowed to post a link to the docs so concatenate https:// with

Sounds like you’re doing something similar to what I plan, except I hope to use L&L to entirely replace the Posts module

Hmm, i doubt this conflict between L&L and the BB Posts module has something to do with Tag in attribute.
My L&L template here only contains a single line:
<Field title />

I guess it has more to do with the loop: the L&L template confusing the current post and the Posts returned by the BB Posts module’s loop (specifically the first post returned in BB’s loop).

Hey Richard, I’d forgotten to whitelist our documentation domain in the Discourse settings! Discourse is pretty cautious about new users and flagged you once you’d “spammed” the same domain three times :woman_facepalming:

I’ve fixed the issue!

1 Like


For the record, I’ve got the same issue last week. I fixed it like this :

In my BB post grid module : [template id=1573 post_id=[wpbb post:id]]

In my Tangible template (id=1573) :

<Loop type=af_annuaire id="{Get local=post_id}">
    <a href="[wpbb post:url]">...</a>

It’s not super clean but it works !


Hi @bikloz, thanks for sharing.
Just tested your workaround, it works for me too indeed.
Pretty tricky though. :wink: