adding page meta select input with custom taxonomy data
-
I have created my custom post type (projects) and taxonomy (project_category).
I would like to add an option to my metabox that displays on “page” posts that shows a list of the project_category so that one can be selected
I’ve created the following to grab a list of the terms, printing the array front end shows the desired results but when it’s used in the page meta box the array is empty at this stage. how can I trigger the page meta box after the project categories have been created?
// Grab List of Project Categories $project_category_list = array(); $cats_args = array( 'orderby' => 'name', 'hide_empty' => false ); $project_cats_obj = get_terms( 'project_category', $cats_args ); foreach ($project_cats_obj as $term ) { $project_category_list[$term->slug] = $term->name; }
The topic ‘adding page meta select input with custom taxonomy data’ is closed to new replies.