Skip Navigation

[Resolved] Conditional display based on post-id

This support ticket is created 3 years, 5 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 3 replies, has 2 voices.

Last updated by Shane 3 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#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: English (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: English (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.