Programming noob here. I use ACF on my website to display affiliate links to products on Amazon. I achieve this by using a “select” field type with the return format set to “both (array)”. The “value” is the Amazon SiteStripe image code and the “label” is a short product description. I implement this on my Elementor page builder using the acf shortcode [acf field="field_name"], since Elementor’s dynamic tags doesn’t seem to work properly with select field types.
Overall I am happy with how it looks, but I would like to remove the comma “, ” that seaparates the value and the label on the frontend and replace it with a line break <br>.
I tried implementing the code snippet posted there into my functions.php, but when I visited my site I was met with a “There has been a critical error on your website” message.
Like the other person in the above post, my knowledge of php is very limited, so I wondered if someone could be so kind as to provide me with a code that I can also add to my functions.php file that would allow me to achieve the desired line break in place of the comma?