Tell us what you are trying to do?
I am displaying a Type by using a shortcode. This is the HTML:
<p><i class="fas fa-map-marker-alt">[types field='city'][/types], [types field='state-or-province'][/types], [types field='country'][/types]</p>
Right now, if there is no value for [types field='city'][/types], it will still show a comma before the next field value. That is a bit weird, and I want to make that comma conditional. It should only follow [types field='city'][/types] if there is a value in there. If that value is empty, the comma should also not show.
I've tried to use the below HTML to achieve this, but it doesn't work, it still shows the commas even if the values are empty.
Hello. Thanks for your reply. I've tried your suggestion, but it is still not resolved. I still see the redundant comma, and on top of that that information shows up twice now. Please see attached screenshot. I've changed it back to the original version for now. Do you have another suggestion that I can follow?
That is strange. Can you please share problem URL and admin 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.