Skip Navigation

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

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 6 años, 9 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Shane hace 6 años, 9 meses.

Asistido por: Shane.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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">
enlace oculto"><img src="enlace oculto" alt="TripAdvisor"/>

</div>
<script async src="enlace oculto"></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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: 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