Skip Navigation

[Resuelto] [wpv-conditional if="( '[wpv-post-type]' eq 'product' )"] is not recognised

This support ticket is created hace 1 año. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 respuestas, has 2 mensajes.

Last updated by Minesh hace 1 año.

Assisted by: Minesh.

Autor
Mensajes
#2597943

I use this on many (all) of my Woocommerce sites but on this site the conditional

[wpv-conditional if="( '[wpv-post-type]' eq 'product' )"]
<div>display something here</div>
[/wpv-conditional]

doesn't recognise the post type slug called 'product'. But...

[wpv-conditional if="('[wpv-post-type]' eq '/product')"]
<div>display something here</div>
[/wpv-conditional]

does work.

Do you know why the slug would be '/product'.

I ask in case this is something I have done... I have never seen that before...

#2598599

Minesh
Supporter

Languages: Inglés (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

It should work as I do not find any issue with the conditional shortcode you are using to check the product post type.

Can you please share problem URL where you added the conditional shortcode and admin access details and let me check whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2599939

Hi Minesh
Thank for your reply. I just mean that I seem to need to call the 'product' slug '/product'. Why on this site would the slug have a '/'? Its very odd... I ask just in case this is an error or something is wrong. Have you ever seen that before?
I have the site on a local server so I am not sure I can get you access at the moment. But I have retrieved the debug report for you. Hope this helps!
Rita

#2599985

Minesh
Supporter

Languages: Inglés (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank for your reply. I just mean that I seem to need to call the 'product' slug '/product'. Why on this site would the slug have a '/'? Its very odd... I ask just in case this is an error or something is wrong. Have you ever seen that before?
==>
No, it should work without the forward slash.

I have the site on a local server so I am not sure I can get you access at the moment. But I have retrieved the debug report for you. Hope this helps!
===>
First of all, based on the debug information you shared I find that you are using the outdated Toolset plugins. We always recommend running your site with the latest stable release plugin version.

*** Please make a FULL BACKUP of your database and website.***

Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/
OR
You can install/update Toolset pluigins using the installer plugin:
-https://toolset.com/faq/how-to-install-and-register-toolset/#automatic-installation-once-you-have-otgs-installer-plugin-installed

Do you see the issue with latest Toolset plugins as well?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.