Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ACF - Wrapper Attributes

I've created a field using Advanced Custom Fields, and have assigned a class to the Wrapper Attributes. However I have yet to find out any method/documentation how exactly to get ahold of this information (how to get the class).

I've used get_field in order to get all values of the field, but it does not display anything more than the URL really.

string(22) "http://www.google.com2"

I've tried with the following also after using get_field

echo $test['class'];

Which then only provides back the letter h for some reason in this case:

hstring(22) "http://www.google.com2"

Code:

<?php the_field('learn_more_url_-_section_1'); ?>
<?php
    $test = get_field('learn_more_url_-_section_1');

    echo $test['class'];

    var_dump($test);

?>

Here is a screenshot of the field setup:

enter image description here

like image 482
wharfdale Avatar asked Aug 05 '26 19:08

wharfdale


1 Answers

The wrapper attributes are specific to the backend display of the fields/field group. You would use an admin CSS file to optimize the backend display using whatever class you entered.

like image 75
Aibrean Avatar answered Aug 07 '26 08:08

Aibrean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!