We have 2 custom fields, one is for a youtube video, the other one for a vimeo video. Both fields can be empty.
- Location Video (location-video), Youtube embeded
- Vimeo Video (vimeo-video), only the url string
1. I like to have, if both fields are empty, that it shows the featured post image.
2. If the youtube field has something in, it use to show this video. The featured image needs to be showed.
3. If this field is empty, but the vimeo field is filled, it uses to show the vimeo player. The featured image needs to be showed.
Is there any documentation that you are following? I tried to find anything, we used to have it, like this, but not working with the new version of toolset:
- if both fields are empty - show only featured image - correct
- if location-video is empty and vimeo-video is NOT empty - show vimeo, but not show featured image
- if location-video is NOT empty and vimeo-video is empty - show Youtube, but not show featured image
Can you please share admin access details so I can see how you setup the things in backend.
*** 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 have set the next reply to private which means only you and I have access to it.
[wpv-conditional if="( $(wpcf-location-video) eq '' ) AND ( $(wpcf-vimeo-video) eq '' )"][wpv-post-featured-image size='center' class='img-responsive']
[wpv-conditional if="( $(wpcf-location-video) ne '' ) AND ( $(wpcf-vimeo-video) eq '' )"][types field='location-video'][/types]
[wpv-conditional if="( $(wpcf-location-video) eq '' ) AND ( $(wpcf-vimeo-video) ne '' )"]<iframe src="[types field='vimeo-video' output='raw'][/types]" width="853" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
It shows the image as first, then the youtube video as second. And it likes to show the vimeo too.
If I use this code:
[wpv-conditional if="( $(wpcf-location-video) eq '' ) AND ( $(wpcf-vimeo-video) eq '' )"][wpv-post-featured-image size='center' class='img-responsive'][/wpv-conditional]
[wpv-conditional if="( $(wpcf-location-video) ne '' ) AND ( $(wpcf-vimeo-video) eq '' )"][types field='location-video'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-location-video) eq '' ) AND ( $(wpcf-vimeo-video) ne '' )"]<iframe src="[types field='vimeo-video' output='raw'][/types]" width="853" height="480" frameborder="0" allowfullscreen="allowfullscreen"></iframe>[/wpv-conditional]
It shows me [types field='location-video'][/types] - but no image.
So, we need to get the logic for showing what needs to get showed first. Then we need to work on the way how it shows. With your code, so additional [/wpv-conditional] - it not showing correct as it needs to be.
For the youtube video, as it is an embedded media, only show [types field='location-video'][/types] will show the video correct.
so that is expected. Every conditional statement needs to be closed with [/wpv-conditional].
if [types field='location-video'][/types] holds the embedded content yu only need to display [types field='location-video'][/types].
Do you mean that with both the places where you display location-video and vimeo-video if both are empty, on both places you wanted to display the featured image. I need to see how you added the location-video and vimeo-video to your page. Can you please send me screenshot or access detaials?
So, I am using a "page block" this is from the theme IMPREZA. Inside there, I am able to add either as text or raw html the toolset stuff.
Other fields are working, either also with conditional. Contitional is somehow not working, when having {!{ instaed of [.
Also the closing conditional is not working, it will gives me just the shortcode part back.
Only adding the featured image, is working. Only adding the youtube video is working, as this is embeded. Where I have a bit troubles, to get a vimeo video added. But not sure, if we have this field filled in.
I need to check on your install how you added the fields and where its braking the things. Can you please share problem URL and access details.
*** 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 have set the next reply to private which means only you and I have access to it.
I need problem URL and access details. Without checking how these conditional statements added from your backend I will not have any clue to give you and that help you in the right direction.
*** 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 have set the next reply to private which means only you and I have access to it.