Before you ask please READ THIS

Set different number of columns for products list and related products

in Rife Posts: 2
Hi,

Initially, I had number of columns set to 3 on the shop page (Products List). I changed it to 2 columns because it looks better. However, when I view the related products on the Single Product Page, I notice that it has also changed to 2 columns, but I would prefer to have 3. How can I enable this?

Many thanks,
Aero

Comments

  • AirAir
    Posts: 10,970
    Hello there:-)

    It sure is a bug. I will fix it for next update, however for know you can do such change in code:

    Go to rife\advance\utilities\woocommerce.php line ~285

    and change this
    function woocommerce_output_related_products() {
        $args = array(
            'posts_per_page' => 3,
            'columns'        => NULL, /* empty so template will decide */
        );
        woocommerce_related_products( $args );
    }
    to
    function woocommerce_output_related_products() {
        $args = array(
            'posts_per_page' => 3,
            'columns'        => 3,
        );
        woocommerce_related_products( $args );
    }
    Thanks for reporting this.

    With kind regards.
  • Posts: 2
    Thanks, works great!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!