Category: ACF


Adding custom CSS class in body_class() using Advanced Custom Fields

The great thing about Advanced Custom Fields is that by using that plugin, you can replace number of other plugin reducing the page load and increasing the site sped, while achieving the same result only by using custom fields. WordPress function body_class() is one of the functions that is basically used by default by theme developers...


How to render shortcode using Advanced Custom Fields

As you know, WordPress function do_shortcode() will render whatever shortcode contains and is frequently used in custom templates. But if you want to allow site owners to update shortcodes easily, without messing with template files (and possibly causing PHP errors and white screens of death), you will want to consider using Advanced Custom Fields.


How to set conditional logic in Advanced Custom Fields

If you tried to set conditional logic using Advanced Custom Fields plugin, but haven't done it before, there's a chance that you will stumble upon the following message "No toggle fields available" wondering what that means. Fortunately, it is very easy to set this up. In order to add toggle fields, you would only need to create a new custom field of "choice" Field Type and add few Choices.