• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Php acf help

codetwist

New member
Babiato Lover
Nov 16, 2019
22
10
3
I am struggling to resolve this but my knowledge of php is very limited..
I will appreciate a little help
i have a acf field with name logo1 and is textarea.
inside this field is some lines with text.
I need a php function to use it on oxygen builder to return this values as <li>
i have the bellow code but not working i get error 500.
any help?


PHP:
<?php
function my_acf_format_value( $value, $post_id, $field ) {
$items_as_array = explode("\n", $value);
$output = "<ul style='list-style-type: circle;'><li>" . implode("</li><li>", $items_as_array) . "</li></ul>";
return $output;
}
add_filter('acf/format_value/key=logo1', 'my_acf_format_value', 10, 3);

?>
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock