• I need to merge the category (or tag) of WooCommerce with the category (or tag) of WordPress standard posts, in order to have a summary page with both product and posts of same category (or tag). Is this possible?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You can’t merge post and product (category and tags) but you can use the common product (category and tags) for both posts and products with the help of below hook.

    function custom_merge_taxonomy() {
    unregister_taxonomy_for_object_type( ‘category’, ‘post’ );
    unregister_taxonomy_for_object_type( ‘post_tags’, ‘post’ );
    register_taxonomy_for_object_type( ‘product_tag’, ‘post’ );
    register_taxonomy_for_object_type( ‘product_category’, ‘post’ );
    }
    add_action( ‘init’, ‘custom_merge_taxonomy’ );

    Sorry, what is this function custom_merge_taxonomy() doing exactly ?

    Thread Starter sqlcat

    (@sqlcat)

    Thanks for the reply! So this function move the post category to product category? If i have some posts (related to a post category) i have to move them to product type?

    Not sure what you want in the final output but you might be able to get the same effect on a page using the display posts shortcode plugin and the built in woocommerce shortcodes

    Thread Starter sqlcat

    (@sqlcat)

    I only need to have a page with both posts and products of a same category or tag
    The shortcodes seems to be a good solution, i’ll try and i’ll update, thank you

    How to use the shortcodes ? Thanks.

    1) With Woocommerce installed, where is the correct place to add categories (and subcategories and products), is it

    a) Dashboard > Posts > Categories

    OR

    b) Dashboard > WooCommerce > Products > Categories

    2) Assuming that the theme author used option a, will that cause a conflict if I use option b?

    3) Is there a way to merge whatever was created and added using option a with all that was created and added using option b?

    new to wordpress, so please bear with me, and kindly disregard my previous post as I am revising it here.

    1) With Woocommerce installed, where is the correct place to add categories (and subcategories and products), is it

    a) Dashboard > Posts > Categories

    OR

    b) Dashboard > WooCommerce > Products > Categories

    2) Assuming that the theme author used option a, will that cause a conflict if I use option b to create and add more categories, subcategories, and products?

    3) Is there a way to merge whatever was created and added using option a with all that was created and added using option b?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Merge Posts and WooCommerce category or tag’ is closed to new replies.