I have installed Advanced Custom Fields 4.0.1
and created a new Field group
containing a single field called preamble
. I would like to position this new field before the editor in the posts edit screen. It seems like all custom fields always are added after a posts ordinary fields.
A solution wouldn’t be to drop the custom fields created with ACF
and use ordinary custom fields.
This can be solved using this nice snippet and
edit_form_after_title
hook. But I haven’t tested what happens when more than one meta box exists. With a single ACF field (position:normal, style:no-metabox
) it works:And if it has to be solved with jQuery, adjust
subtitle_text
to your Field Name:I’ve checked into this a bit. I looked at the ACF source. The plain fields that ACF uses are still actually meta boxes. ACF is just using CSS to make them look like more generic fields. They are still being handled as meta boxes by WP (
do_metaboxes
action).To add plain fields to other parts of the edit form, you’ll need to use the appropriate hooks. More hooks on the edit screen:
There is a native solution provided by ACF nowadays.
You can set the position of your group of fields.
By default it’s set to “Position : High (after title)” but you can change it when you edit your group of fields.
With thanks to @brasofilo for the initial answer.
I only needed to move one fields before the editor field. Instead of all additional the fields.
This is how i fixed it: