the answer for all question about Oxygen Builder plugin and WordPress

Hi everyone,


Hi everyone,
I’m trying to get ACF Font Awesome Icon to work with oxygen. However, it just returns “no data for field”. Has anyone done this or can point me in the right direction? Thanks in advance.

The plugin can only return the value of the icon as element, class, unicode or object. I guess this is why oxygen can’t read it. No matter what I choose, if I look in the code on the frontend, there is just no data pulled from the field. Or is there another possibility to add dynamic data other than a text field? Unfortunately I’m not able to write jQuery myself, but I guess it should be pretty easy to pull the data with a code block!?
Font Awesome is installed on the site, if I put in a code block, it shows the icon. So if the plugin can output a class, there should be a way to pull the class from the field and add it to an element. Adding the classes “fas” and “fa-wifi” directly in oxygen also works.



Source

2 Comments
  1. Flx Grafix says

    Want to share a bit of progress, for those who are interested: I found a workaround. Not a clean solution (I’m still wanna get this to work), but it does the job.
    Install Font Awesome plugin, create a single text line field with ACF and paste the HTML code of the FA icon in there. You only have to change the class fa-solid (or fa-****, depending on the icon) into fas (e.g. fas fa-wifi).

  2. Niko Hannula says

    Have not tested this plugin but you should be able to do it with a code block in PHP:

    $value = get_field( “yourFaFieldName” );
    if( $value ) {
    echo $value;
    }
    else {
    echo ’empty’;
    }

    Maybe remove the else clause in production though.

Leave A Reply

Your email address will not be published.

Oxyrealm Docs