Awesome,
Thanks, I was able to get things working with that information.
In case anyone else has a similar need to output the ACF Font Awesome element into a CSS pseudo-element such as “::before”, this is how I implemented it for output from an options panel:
.sidebar-primary .current_page_item:before{
content:”<?php $icon = get_field(‘sidebar_icon’, ‘option’); echo $icon->hex; ?>”;
font-family: FontAwesome !important;
position:relative;
height:30px;
float:left;
}
Thanks for responding!
Actually, I’m having no issues getting the field into the stylesheet. The issue I’m having is that it outputs the unicode in full, like so: . However, pseudo-elements don’t seem to recognize this. Instead it needs to be the escaped value, like so: “\f042”.
Is there a way to get the plugin to output “\” instead of &#x”?