I am trying to: add a conditional statement to a content template to display an iframe if the content of the field contains the word "youtube" in it or the img src="... if the content of the field contains ".jpg" or ".png"
I see an option for "=", but the field has to be that exact phrase used in the statement for it to work. Each URL is going to be different, but if an image or video, it will have one of the phrases in it.
I visited this URL: hidden link
I expected to see: nothing yet, this conditional statement has not been added.
Instead, I got: a broken image link because the image has a youtube URL and not an image URL.
Currently taking a look at what your are trying to achieve, it goes out of the scope of what our conditionals can do.
Its not able to evaluate an entire statement for a single character. This would require a more complex conditional statement and as such would need to be custom written.
Our conditional is only able to evaluate against an exact value of a field. So if there is a text field and the only text in it is Youtube then you can evaluate that.
Please let me know if this helps.
Thanks,
Shane
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.