I have an ACF Text Area field (2 actually) on my clients Wordpress site that will contain a list. The client wants this to output as bullet points on the front end.
I am relatively new to JS so trying to work out how exactly to do this!
I found this - https://www.advancedcustomfields.com/resources/acf-format_value/ - from ACF in terms of adding formatting to certain fields, so have worked out how to add the code to the fields! However, I am struggling to figure out what coding to put in the middle to get each <br>
to add a new <li>
instead...
function my_acf_format_value( $value, $post_id, $field ) {
$my_acf_format_value = explode("\n", $value);
echo '<ul>';
echo '<li>' . implode( '</li><li>', $value) . '</li>';
echo '</ul>';
}
add_filter('acf/format_value/name=averetourism_tour_included', 'my_acf_format_value', 10, 3);
add_filter('acf/format_value/name=averetourism_tour_to_bring', 'my_acf_format_value', 10, 3);
This is being implemented on the fields, but isn't outputting any of the data.
Any help would be greatly appreciated!!!