Skip to content

Instantly share code, notes, and snippets.

@wpmark
Created December 23, 2014 15:50
Show Gist options
  • Save wpmark/6e8c2058eec452ce6195 to your computer and use it in GitHub Desktop.
Save wpmark/6e8c2058eec452ce6195 to your computer and use it in GitHub Desktop.
Add new Taxonomies in WP Broadbean
<?php
/**
* function wpmark_add_wpbb_taxonmies()
* adds new taxonomies for jobs
* @param (array) $tax is the current array of taxonomies to add
* @return (array) $tax is the new array of modified taxonomies to add
*/
function wpmark_add_wpbb_taxonmies( $tax ) {
$tax[ 'country' ] = array(
'taxonomy_name' => 'wpbb_country',
'broadbean_field' => 'job_country',
'plural' => 'Countries',
'singular' => 'Country',
'slug' => 'job-country',
'menu_label' => 'Countries',
'hierarchical' => true,
'show_admin_column' => true
)
return $tax;
}
add_filter( 'wpbb_registered_taxonomies', 'wpmark_add_wpbb_taxonmies' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment