Skip Navigation

[Resolved] Conditional content view

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here was that the user wanted to display his content using a different content template based on the value of a custom field.

Solution:

The solution here is to use the conditional shortcode to do this.

https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-types-fields-and-custom-fields/

This support ticket is created 6 years, 8 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.

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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by ericW-5 6 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#631834

I need to show loop items differently in the jobs list depending on the fact a position is filled or not.

A- if the position is filled ('emploi pourvu' is ticked) then the loop item should be like this : hidden link
which means the job/post title should not be clickable.

B- if the position is not filled ('emploi pourvu' is not ticked) then the loop item should be like this : hidden link
which means the job/post title should be clickable to access the job details.

I tried to set this up without success so far : hidden link

Thanks in advance for your help
Eric

#632109

Shane
Supporter

Languages: English (English )

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

Hi Eric,

Try using this .

<li>[wpv-conditional if="( $(wpcf-poste-pourvu) eq '1' )" evaluate="false"][wpv-post-body view_template="Loop item in recherche emploi"][/wpv-conditional][wpv-conditional if="( $(wpcf-poste-pourvu) ne '1' )"][wpv-post-body view_template="loop item in recherche demploi pourvu"][/wpv-conditional]</li>

Thanks,
Shane

#632225

Solved
Thanks
Eric