Home Forums WoodMart support forum number of columns for the product page

number of columns for the product page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #408904

    loralora
    Participant

    Hello, please tell me the correct solution / workaround or something else?
    My problem: I’m adding a shortcode to display recently viewed products on a product page.
    Important clarification: I’m using gutenberg – I don’t need the elementor.

    here is my code: (before that i set cookies for it)

    add_shortcode( 'recently_viewed_products', 'mxp_recently_viewed_products' );
     function mxp_recently_viewed_products() {
     	if( empty( $_COOKIE[ 'woocommerce_recently_viewed_2' ] ) ) {
    		$viewed_products = array();
    	} else {
    		$viewed_products = (array) explode( '|', $_COOKIE[ 'woocommerce_recently_viewed_2' ] );
    	}
     	if ( empty( $viewed_products ) ) {
    		return;
    	}
     	$viewed_products = array_reverse( array_map( 'absint', $viewed_products ) );
     	$title = '<h5>/h5>';
     	$product_ids = join( ",", $viewed_products );
     	return $title . do_shortcode("[products ids='$product_ids'  columns='6' orderby='' class='']");
    
     
    }

    My problem:

    On the product page, 4 product columns are displayed, despite the fact that I set 6 in the settings.

    Then I realized the problem: The number of columns is regulated by this item: (see photo). When I change the value to 6, it works both for the archive pages and for the individual product pages for this particular code.

    My question is, is there a way to remove the effect of these customizations for a single product page? So that they only affect archive pages?

    But on the page of one product, so that the code does not inherit 4 columns, but is displayed as 6.

    I tried changing “Settings” ▸ “WooCommerce”
    “Product catalog” – but this does not help because apparently your settings have the highest priority.

    Attachments:
    You must be logged in to view attached files.
    #408908

    Hello,

    WoodMart theme is based either Elementor or WP bakery page builder. Our support does not cover Gutenberg and third parties code fixing. You will need to find a developer who would help to you.

    If you have any questions please feel free to contact us.

    Best Regards

    #409047

    loralora
    Participant

    The problem is not in my code.

    The problem is that the theme settings for the product archive are applied on the product page.

    is there a solution for product archive settings not working for product page??

    #409048

    loralora
    Participant

    I need this theme setting to apply ONLY to the product archive settings.

    and did not apply to the single product.

    Attachments:
    You must be logged in to view attached files.
    #409136

    Hello,

    Please insert the site admin access into the Private content below the message area. We will take a closer look at the case.

    Best Regards

    #409518

    loralora
    Participant

    Hello
    thanks for your support
    sorry i cant give admin rights
    Do you have any other ideas?

    #409594

    loralora
    Participant

    I found my problem, it is not related to the topic. Topic can be closed

    #409629

    Hello,

    We are glad you have solved the issue.

    If you have any questions please feel free to contact us.

    Best Regards

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘number of columns for the product page’ is closed to new replies.