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.

Read More
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

Related posts

1 comment

  1. 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.

Comments are closed.