Skip to main content
grammar, spelling, capital P
Source Link
helgatheviking
  • 14.5k
  • 8
  • 64
  • 115

I'm using woocommerceWooCommerce that uses costum postsa custum post type (product) with hitsits own productcategoryproduct category taxonomy (product_cat). Now I'm using an other plugin (minimu) that selects postposts to display based on the normaly wordpressnormal WordPress category. Seeing as my custom post types dont belowdon't belong to a regular category it displays nothing... Now I want to make it so that I can assign a productcategoryproduct category 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 woocommerceWooCommerce? But no idea how and what?

EDIT foundEDIT

Found this code, that makes it able to assign regular categories to custom type'spost types but now my importer doesntdoesn't assign them, but I think illI'll 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

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

I'm using WooCommerce that uses a custum post type (product) with its own product category taxonomy (product_cat). Now I'm using an other plugin (minimu) that selects posts to display based on the normal WordPress category. Seeing as my custom post types don't belong to a regular category it displays nothing... Now I want to make it so that I can assign a product category 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 post types but now my importer doesn't assign them, but I think I'll 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

added 441 characters in body
Source Link
Bram
  • 345
  • 1
  • 4
  • 10

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

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?

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

Source Link
Bram
  • 345
  • 1
  • 4
  • 10

Use regular category with custom post types

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?