Skip Navigation

[Resolved] Set a condition to show a view in a page template

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

Last updated by Minesh 5 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1217149
afb1.jpg
afb2.jpg

Hi,

I have a page template in which I show views. I have made a view for each month. Such a view shows events which take place in that month. Each event has an expiration date and after that date the event is not shown in the view. This works exactly as I want it.

In a page template I use all the month views.

Is it possible to set a conditional arround a view? For instance when March is over I want March to to be shown anymore. I have it working but now the month March is not shown anymore when all the events of march are done. I would like to show the march view until march is over.

My site is under constuction. If you want I can give you logins so you can see what I mean if it is not clear.

Kind regards,
Sandra Berends

#1217872

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - can you please share problem URL and access details so I can review your setup and guide you accordingly.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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

#1218829

Hi,

Minesh is on vacation, your will get the answer in tomorrow morning

#1219721

Minesh
Supporter

Languages: English (English )

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

Well - I review your setup and as far as I can see you are using the following to construct your slide set:
=> hidden link

The thing is that - you added all the views to display with slides. The thing is that you added all the views for each month one after another to your content template and the visibility (slides) is controlled by the JS library of slides.
=> hidden link

View's offers shortcode [wpv-conditional] using which you can display the conditional content but with your setup it will not work as views are added as slides and slides are controlled by your slider library.
=> https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

I suggest you should contact the support of slider library you are using and check with them how you can display the slides per month as per your requirement.

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