Home › Forums › Front-end Issues › How to Apply Custom Field Content to Styles? › Reply To: How to Apply Custom Field Content to Styles?
You would have to use inline styles. You simply need to create a style block.
<style>
/* add styles using acf fields, for example: */
.some-class {
background-image: <?php the_field('my_backgroung_field');
}
</style>
Please note, it is just a quick example
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.