pods-framework / pods-beaver-builder-themer-add-on

Integration of Beaver Themer plugin for WordPress (https://pods.io/beaver-themer/)
https://wordpress.org/plugins/pods-beaver-builder-themer-add-on/
GNU General Public License v2.0
35 stars 6 forks source link

Using Tabs or Accordion modules won't allow me to display multiple templates holding pods fields #62

Closed mikexavier closed 6 years ago

mikexavier commented 6 years ago

I posted this in the slack channel for pods, and Jim suggested I put it down here.

I'm trying to add a tabs module with 3 tabs. Each displays a saved template built with beaver builder. In those templates I'm using multiple HTML modules to display custom pods fields.

eg.

<div>
<img style="width:30px; line-height:30px;" src="http://ticino-adventures.local/wp-content/uploads/2018/01/ticino-adventures-biking-ascent.svg">
<span style="line-height:30px; vertical-align:middle; padding-left:5px;font-weight:bold;">[wpbb post:pods_display field='ascent']</span></div>
[/wpbb-if]

[wpbb-if post:custom_field key='descent' exp='equals' value='true']
<div style="padding-bottom:15px;">
<img style="width:30px; line-height:30px;" src="http://ticino-adventures.local/wp-content/uploads/2018/01/ticino-adventures-biking-descent.svg">
<span style="line-height:30px; vertical-align:middle; padding-left:5px;font-weight:bold;">[wpbb post:pods_display field='descent']</span></div>
[/wpbb-if]

[wpbb post:pods_display field='trip_description']

I can add one template, to one tab no problem. As soon as I add a second tab, add the second saved template, it stops working.

I see the following in console: "Uncaught SyntaxError: Unexpected token < in JSON at position 0" on line 1 of http://ticino-adventures.local/fl-theme-layout/activity-detail-page/?fl_builder.

If I deactivate pods, it works no problem, I can add a few tabs, all displaying saved templates.

Any ideas?

thx!

NOTE: since posting and doing some trial and error, I found a work-around. If I disable the pods plugin and themer integration plugin, then set up the tabs module exactly how I need it. Include shortcodes (instead of adding via native integration), to the templates I'd like displayed... then activate the pods plugins again, it works. BUT if I go to adjust anything, it breaks.

quasel commented 6 years ago

Doe's it work if you use only field connections from BB like post title or their custom field connection? not sure this is entirely pods related ...