Site logo

[Resolved] Woo Single Product, Product Description blocks

Home Forums Support [Resolved] Woo Single Product, Product Description blocks

Home Forums Support Woo Single Product, Product Description blocks

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2508098
    troyw

    Hey guys,
    I have GP Premium and Generateblocks Pro and I am trying to create a section in the single product description with two Columns, so that I can have a Video on the left and a button on the right (or vis versa). I was expecting to see the block editor or something in the Single Product backend, but there are no tools to enable me to simply add the 2 columns, as I would in a page or a post.
    I found this post #2466284, but I can see no GB Buttons on my Product editor?
    How can I do this?

    #2508101
    Fernando
    Customer Support

    Hi Troyw,

    I found this article which may be helpful for you and what you’re trying to do: https://docs.wpstackable.com/article/485-how-to-use-the-block-editor-in-woocommerce-product-pages

    This article basically shows how to change the editor of WooCommerce Product edit pages to the Block Editor.

    #2508104
    troyw

    Thanks so much Fernando.
    I tried adding this to the Functions PHP file in the child theme but it errors?

    #2508110
    Fernando
    Customer Support

    Try this:

    // enable gutenberg for woocommerce
    function activate_gutenberg_product( $can_edit, $post_type ) {
     if ( $post_type == 'product' ) {
            $can_edit = true;
        }
        return $can_edit;
    }
    add_filter( 'use_block_editor_for_post_type', 'activate_gutenberg_product', 10, 2 );
    
    // enable taxonomy fields for woocommerce with gutenberg on
    function enable_taxonomy_rest( $args ) {
        $args['show_in_rest'] = true;
        return $args;
    }
    add_filter( 'woocommerce_taxonomy_args_product_cat', 'enable_taxonomy_rest' );
    add_filter( 'woocommerce_taxonomy_args_product_tag', 'enable_taxonomy_rest' );
    #2508111
    troyw

    Sorry, yes, just removed the <br> at bottom and now it works. Cheers

    #2508113
    Fernando
    Customer Support

    Cheers!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.