Support

Account

Home Forums Front-end Issues How to Apply Custom Field Content to Styles? Reply To: How to Apply Custom Field Content to Styles?

  • There are different ways to create custom bullet points, either with the list-style-image CSS property or with a background image or with generated content (CSS pseudo-elements :before/:after, and then a background on those).

    The best practice would be an internal stylesheet in the document header (similar to what John Huebner suggested), i. e. in header.php, and then add a class to the list (or an ancestor) in question to apply this style to that element.

    Another way would be inline-styles on the list items themselves, like:
    <li style="background-image: url("<?php the_field('bullet_image'); ?>">item text</li>

    But the first method would be preferable as it is more flexible in the end.