Saltar navegación

[Resuelto] change class conditional

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

Problem:

Use [wpv-conditional] shortcode to setup background image.

Solution:

Please try to wrap the background image URL with single quote and test again, for example:

https://toolset.com/forums/topic/change-class-conditional/#post-1826849

Relevant Documentation:

This support ticket is created hace 4 años, 8 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.

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

Zona horaria del colaborador: Asia/Hong_Kong (GMT+08:00)

Etiquetado: 

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por pierre-yvesC hace 4 años, 8 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#1826223

Hi,

I'm trying to use what is explained here https://toolset.com/forums/topic/change-css-of-sidebar-tabs-based-on-value-of-view/ without good results.

So I tried to style it in line instead of using classes. It works pretty well except for adding background image :

<div style="height: 100%;
[wpv-conditional if="( '[wpv-post-id]' eq '2796' )"]background-color: #bd1b21; [/wpv-conditional]
[wpv-conditional if="( '[wpv-post-id]' eq '2801' )"]background-color: #529546; [/wpv-conditional]
[wpv-conditional if="( '[wpv-post-id]' eq '2803' )"] background-image: url("enlace oculto"); background-repeat: repeat; background-color: #a70e13; color: #ffffff;[/wpv-conditional]">
content
</div>

The background image just doesn't show up
Any idea?

Many thx

#1826849

Hello,

Please try to wrap the background image URL with single quote and test again, for example:

<div style="height: 100%;
[wpv-conditional if="( '[wpv-post-id]' eq '2796' )"]background-color: #bd1b21; [/wpv-conditional]
[wpv-conditional if="( '[wpv-post-id]' eq '2801' )"]background-color: #529546; [/wpv-conditional]
[wpv-conditional if="( '[wpv-post-id]' eq '2803' )"] background-image: url('<em><u>enlace oculto</u></em>'); background-repeat: repeat; background-color: #a70e13; color: #ffffff;[/wpv-conditional]">
content
</div>

It works fine in my localhost,

#1827029

Ah yeah! Single quote vs double quote. It always mystify me.

You're the boss, my issue is resolved. Many thx!