Skip Navigation

[Résolu] Conditional display based on post-id

This support ticket is created Il y a 3 années et 4 mois. 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
- 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 3 réponses, has 2 voix.

Last updated by Shane Il y a 3 années et 4 mois.

Assisted by: Shane.

Auteur
Publications
#1832201

I have an existing site which uses Views shortcodes.
Within a content template, is it possible to make the display of some text dependent upon a specific post-id? I mean using the wpv-conditional shortcode?
Regards
Robert

#1832375

Shane
Supporter

Languages: Anglais (English )

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

Hi Rober,

Thank you for getting in touch.

Yes you can using our wpv-conditional shortcode to check the post's ID.

Thanks,
Shane

#1832399

Hi Shane
Could you assist with an example shortcode please. For example, if the post-id is 356, then what would the wpv-conditional code line be?

So that the field would be displayed if the post-id was 356?

Regards
Robert

#1832457

Shane
Supporter

Languages: Anglais (English )

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

Hi Robert,

Here is an example

[wpv-conditional if="('[wpv-post-id]' eq '356')"] 
Do this
[/wpv-conditional]

Thanks,
Shane

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