Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using woocommerce that uses costum posts with hits own productcategory taxonomy. Now I'm using an other plugin (minimu) that selects post to display based on the normaly wordpress category. Seeing as my custom post types dont below to a regular category it displays nothing... Now I want to make it so that I can assign a productcategory as well as a normal category to each post.

How would I have to modify this? I guess adding something to the custom post declaration of woocommerce? But no idea how and what?

EDIT found this code, that makes it able to assign regular categories to custom type's but now my importer doesnt assign them, but I think ill be able to fix this.

 add_action( 'init', 'wpse6098_init', 100 ); // 100 so the post type has been registered
function wpse6098_init()
{
    register_taxonomy_for_object_type( 'category', 'product' );
}

This post may be deleted, tried to do it myself

share|improve this question
Please always link to any used plugin, theme, repo, etc. Thanks. – kaiser Sep 4 '12 at 15:56
2  
And please move your edit to an answer. This is a system that saves solutions for later users. – kaiser Sep 4 '12 at 16:08

1 Answer

found this code, that makes it able to assign regular categories to custom type's but now my importer doesnt assign them, but I think ill be able to fix this.

<?php
add_action( 'init', 'wpse6098_init', 100 ); // 100 so the post type has been registered
function wpse6098_init()
{
    register_taxonomy_for_object_type( 'category', 'product' );
}

This post may be deleted, tried to do it myself

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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