How does the post module get_terms() ?

hello peeps.

We’re using cpt-onomies to turn a custom post type into a taxonomy with it’s posts being the terms. There are many advantages to this in our situation.

One thing we were hoping was that when using the bb posts module, we would see our newly created terms show up under “filter.”

However, they’re not and i’m not sure why. They show up under the backend when we create the meta box that uses get_terms().

CPT-onomies does support a lot of standard wp taxonomy functions http://wpdreamer.com/plugins/cpt-onomies/documentation/

How does the beav’s posts module get the terms for the post? If it’s not get_terms(), what do yo use and do you have any idea or direction on how I could get this to work?

I dug around in the code for the module but couldn’t find anything specific.

Hey Thomas,

I’ve already assigned another member of the team to assist you.

Ben

Hi Thomas,

The builder is using get_object_taxonomies to get the taxonomies for a post type and display them in the filter section. When you choose an option for the “Post Type” setting, the relevant taxonomies will be displayed.

Are your taxonomies showing up at all? We’re not showing terms anywhere as those are what are returned when you enter a value in the taxonomy autosuggest fields.

Justin

They’re not. I set up the cpt-oxonomies and assigned them to a post via the cpt-onomie admin.

I then:

  • selected the new cpt-onomy term from the post’s meta box and saved it.

  • I dropped in a posts module and looked to see if any of the autosuggest filters searched for my terms (they didn’t nor was there a new one for the term type created by cpt-onomy).

Am I missing a step?

Btw, I did check the output of

<?php 

   $taxonomy_names = get_object_taxonomies( 'post' );
   print_r( $taxonomy_names);

?>

and my taxonomy type did get spit out.

I know I’m missing something, I just can’t figure out what.

Hi Thomas,

My mistake, we’re actually using get_categories to pull in the tax data, but it should work for any taxonomy…

$cats = get_categories(array(
   			'hide_empty' => 0, 
   			'taxonomy'	 => $_REQUEST['fl_as_action_data']
		));

Can you see if your tax comes up using that?

Justin

Sorry, posted too soon. The code above is what pulls the terms for a taxonomy in the auto suggest field. If your tax fields aren’t showing up, then that issue is with get_object_taxonomies. I looked at the code and we do have this when building our tax array…

if(!$tax->public || !$tax->show_ui) {
   				continue;
			}

Is your taxonomy public?

Justin