Adjust Rank Math metabox position below ACF

If you’re using the rising star SEO plugin Rank Math, you may have noticed its post metabox being always abow ACF metaboxes. As an administrator, this behavior is not convenient.

ACF Form: How to convert form to Bootstrap 4

ACF Form acf/prepare_field acf/validate_field acf/get_field_label

ACF Form is an awesome tool. It can be used in plenty scenarios. But when it comes to front-end display, it can become tricky to make it compatible with the actual WordPress theme. In this tutorial we’ll see how to make ACF Form use Bootstrap 4 logic.

How to set Image Field as Featured Image

Image acf/update_value

In order to automatically set an Image field as featured thumbnail for a post, we will have to use acf/update_value. Image fields create new attachments upon upload and store the attachment_id in the field value. This behavior is very close the WordPress one.

ACF Form: How to make Post Content field required?

ACF Form acf/validate_field

When using ACF Form as a post editor, ACF will display a virtual WYSIWYG field. Unfortunately the field isn’t required. In some cases it is interesting to make it mandatory.

ACF Form: How to hide or modify a field?

ACF Form acf/prepare_field

We’re going to use acf/prepare_field, as it is called right before displaying ACF Form. ACF use the same method in front-end and back-end. So the way to target front-end is to use the is_admin() conditional.