id for categories and products

Try this, I have updated it with a hook for when you save the product, try saving a product and see if it assigns everything correctly add_action(‘save_post_product’, ‘wpb_assign_product_to_categories_on_save’); function wpb_assign_product_to_categories_on_save($post_id) { // Check if this is a valid call if (defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) return; // Check the user’s permissions if (!current_user_can(‘edit_post’, $post_id)) return; // Call … Read more

shortcode appears as text in the search result

There is a stray > at the end of our code above, make sure that is a ?> instead of > Try another shortcode, something simple to verify it is not shortcodes in general. Clear you caching, clear permalinks by going to the permalinks page and clicking update. Check if the search plugin has caching … Read more