taxonomy_edit_form_fields output after term fields

by Kevin Robinson   Last Updated May 22, 2018 17:08 PM

I'm using the following code to create a custom metabox on a custom taxonomy page.

$term_filter_name_edit = $type . '_edit_form_fields';
add_action($term_filter_name_edit, 'box_term', 1000, 1 );
function box_term() {
  echo 'Test output';
}

However, this outputs Test output before the default term fields. I want it to output after the default term fields.

How can I achieve this?

--

Curiously, using _add_form_fields outputs after the fields on the add page, but using _edit_form_fields seems to output before.



Answers 1


Got it!

It seems this action is fired within a table element.

Removing the _fields part seems to have done the trick as this refers to an action fired later in the page, after the table.

$term_filter_name_edit = $type . '_edit_form';
add_action($term_filter_name_edit, 'box_term', 1000, 1 );
function box_term() {
  echo 'Test output';
}

Reference: https://github.com/WordPress/WordPress/blob/master/wp-admin/edit-tag-form.php

Kevin Robinson
Kevin Robinson
May 22, 2018 17:05 PM

Related Questions





Filter taxonomy admin pagination

Updated August 16, 2017 17:08 PM