We have created a custom field to add a URL for front end users to be able to download PDFs
We would like this field to display conditionall if the field has a value as a button.
We are using Elementor.
The third problem we have is that we are using HTML to display the button:
[wpv-conditional if="( '[types field='my-url-field'][/types]' ne '')"]download [/wpv-conditional]
but an additional closing is being added to the front end content making the button unusable.
Is there a similar example that we can see?
You can see the front end output here hidden link
What is the link to your site?
Its a local staging site
It would appear that these shortcodes are rendering as you say. DO you have our Views/Blocks plugin installed and activated? As this shortcode requires that our Blocks plugin be active.
You are correct, now we have the Blocks add on we can see the additional option in settings.
For the button this is the solution we've used. Not very elegant! but it works.
[wpv-conditional if="( '[types field='new-test'][/types]' ne '')"]
<div class="my-btn">Open Link</div>
[/wpv-conditional]
Your debug info
[wpv-conditional if="( '[types field='my-url-field'][/types]' ne '')" debug='true']download [/wpv-conditional]
####################
Debug information
####################
--------------------
Original expression: ( 'lta href="/wp-content/uploads/2022/06/autozip" title="/wp-content/uploads/2022/06/automatewoo-4.zip">/wp-content/uploads/2022/06/auto.ziplt/a>' ne '')
--------------------
After replacing 1 general variables and comparing strings: ( 'lta href="/wp-content/uploads/2022/06/auto.zip" title="/wp-content/uploads/2022/06/auto.zip">/wp-content/uploads/2022/06/auto.ziplt/a>' ne '')
Comparing lta href="/wp-content/uploads/2022/06/auto.zip" title="/wp-content/uploads/2022/06/auto.zip">/wp-content/uploads/2022/06/auto.ziplt/a> to