Custom Grid using WPBakery Grid Builder not working

This topic has 3 replies, 2 voices, and was last updated 4 years, 3 months ago ago by Olga Barlow

  • Avatar: FastFormations
    rj
    Participant
    November 7, 2020 at 08:16

    Hi

    I tried to create a custom grid.

    Set the custom grid in theme options – > woocommerce (shop) – > shop – > product style – > product content effect – > custom and selected my custom grid.

    But the changes are not reflecting on my shop page.

    Also WPBakery Grid builder is not showing preview when creating a custom grid.

    2 Answers
    Avatar: FastFormations
    rj
    Participant
    November 8, 2020 at 12:12

    I actually don’t want to create custom grid, my only requirement is to show custom attributes (Product condition and Gender) to display on grid/list view. Can you please help me with that?

    Avatar: Olga Barlow
    Olga Barlow
    Participant
    November 9, 2020 at 12:13

    Hello,

    Add the below code to child theme functions.php and edit ti according to your needs to show the attributes you need

    add_action('woocommerce_after_shop_loop_item_title', 'show_attributes', 10);
    function show_attributes(){
        global $product;
    	if ($product->get_attribute('pa_color')){
    		echo '<p>' . wc_attribute_label('pa_color') . ': ' . $product->get_attribute('pa_color') . '</p>';
    	}
    	if ($product->get_attribute('pa_size')){
    		echo '<p>' . wc_attribute_label('pa_size') . ': ' . $product->get_attribute('pa_size') . '</p>';
    	}
    }

    Regards

  • Viewing 3 results - 1 through 3 (of 3 total)

The issue related to '‘Custom Grid using WPBakery Grid Builder not working’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.