Skip Navigation

[Resolved] Cannot insert inside a visual editor cell in Layout

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user had some custom js in a script tag and wanted to add it to Layouts.

Solution:
What you can do is to add the code to a widget and then add this widget to Layouts and this should work.

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Shane 6 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#618177

Pat

Hello,

I'm trying to insert a tripadvisor widget into a visual editor cell.
The widget is composed by 2 different items :
- a div with an id + code
- a <script></script> which call a file

As soon as I save the cell, the <script></script> is deleted from the cell, so the tripadvisor widget does not work.
If I place it into a page, then,everything works fine.

What can be do to make it work into a Layout cell?

Regards
Pat

#618350

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Thank you for contacting our support forum.

Is this an actual widget, meaning you can go to Appearance -> Widgets and the widget appears there? Or is it a widget code that was created from Tripvisor.

If its code could you send me it so that I can have a look at test on my end.

Please let me know.
Thanks,
Shane

#618366

Pat

Hi Shane,

Thanks for coming back on this.

The widget is in fact a bunch of code provided by Tripadvisor that we need to integrate into the site as HTML.
Here is the code :

<div id="TA_selfserveprop24" class="TA_selfserveprop">
<ul id="hAh1SBDqKBqC" class="TA_links er1DSZ7gkIGq">
<li id="MiNsptOFYs" class="WT0TscEgjpn">
hidden link"><img src="hidden link" alt="TripAdvisor"/>

</div>
<script async src="hidden link"></script>

As mentioned, this code integrated inside a page works fine, but when placed inside a Layout Visual Editor Cell, then the <script></script> is deleted.

Regards
Pat

#618380

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2018-02-21 at 11.06.45 AM.png

Hi Pat,

Thanks for confirming.

What you can do is to add the code to a widget -> See Screenshot

Then add this widget to your Layout.

Please let me know if this helps.
Thanks,
Shane

#618382

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2018-02-21 at 11.06.45 AM.png

Hi Pat,

Thanks for confirming.

What you can do is to add the code to a widget -> See Screenshot

Then add this widget to your Layout.

Please let me know if this helps.
Thanks,
Shane