0

My client has a Law Firm, and he is asking if we can change the term CATEGORIES to JURISDICTION. (I tried to explain that he could create a new category called "jurisdiction", but that is not an option)

enter image description here

1 Answer 1

1

Use taxonomy_labels_category filter (documented here: https://developer.wordpress.org/reference/hooks/taxonomy_labels_taxonomy/) in order to change any of the labels that you need changed.

Here's what works for me:

add_filter( 'taxonomy_labels_category', 'filter_category_labels' );
function filter_category_labels( $labels ) {
    $labels->menu_name = 'Jurisdiction';
    return $labels;
}

You will have to change quite a few other values in the $labels object though.

Here's a full list of the properties of the object:

  • name
  • singular_name
  • search_items
  • popular_items
  • all_items
  • parent_item
  • parent_item_colon
  • edit_item
  • view_item
  • update_item
  • add_new_item
  • new_item_name
  • separate_items_with_commas
  • add_or_remove_items
  • choose_from_most_used
  • not_found
  • no_terms
  • items_list_navigation
  • items_lists
  • most_used
  • back_to_items
  • menu_name
  • name_admin_bar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.