About Category

0

I just link my category wordpress with Anspress with this code :

<?php

/**

* Allow adding post catgeory to question CPT.

*/

function my_ap_category_taxonomy_to_question() {

register_taxonomy_for_object_type( category, question );

}

add_action( init, my_ap_category_taxonomy_to_question );

 

But when I click in category order I can’t found wordpress category (look screenshoot) :

 

And when someone ask question I wan’t to put the question in good category here but in AnsPress Tools I can’t find the option :

Regards,

Noé

0

Do you mean category not appearing? Its because you have not added any AnsPress category. Once you add a category in AnsPress then category select field will appear.

Cheers.

commented on answer

Good Afternoon, No I link category WordPress to anspress category with this code : <?php /** * Allow adding post catgeory to question CPT. */ function my_ap_category_taxonomy_to_question() { register_taxonomy_for_object_type( ‘category‘, ‘question‘ ); } add_action( ‘init‘, ‘my_ap_category_taxonomy_to_question‘ );

You are viewing 1 out of 2 answers, click here to view all answers.