Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
DaveS
tagDiv Member

Hi Simion,

sorry for the late update. It works perfectly after adding the above code to functions.php! Thanks for your support, much appreciated!

DaveS
tagDiv Member

Lets say I don’t want to show that 1 product per row on mobile, but keep the default 2. Is there an easy way to edit the total number of products per page for mobile so that there’s no single product on the last row of each page?
Thanks!

DaveS
tagDiv Member

Thanks Simion! It actually works this way. The thing is – always when opening a woocommerce category page or going to the next page, it flashes initially the default 2 products/row, and then shows only one, bigger product image, according to the new css added for phones. It’s not quite the optimal solution for the case. Is there a way to change the number of products per page for phones?

Having in mind that I already have this in functions.php:

function new_loop_shop_per_page( $cols ) {
// $cols contains the current number of products per page based on the value stored on Options -> Reading
// Return the number of products you wanna show per page.
$cols = 15;
return $cols;
}

// Change number or products per row to 3
add_filter(‘loop_shop_columns’, ‘loop_columns’);
if (!function_exists(‘loop_columns’)) {
function loop_columns() {
return 3; // 3 products per row
}
}

DaveS
tagDiv Member

After doing some tests, it turns out that the last suggested code:
.woocommerce .columns-3 ul.products[class*=columns-] li.product, .woocommerce-page ul.products[class*=columns-] li.product {
width: 100%;
}
changes the design of the desktop version too. It shows 1 product per row on both mobile and desktop.

It should keep showing 3 products per row on desktop, which was achieved using this code:
// Change number or products per row to 3
add_filter(‘loop_shop_columns’, ‘loop_columns’);
if (!function_exists(‘loop_columns’)) {
function loop_columns() {
return 3; // 3 products per row
}
}

Changing the total number of products per page for mobile would also be a solution. This way we can keep showing 2 products per row, just need to define somehow a total number of lets say 16 products so that there no single product left at the end of each page. Any ideas how to achieve?

DaveS
tagDiv Member

Works perfectly! Thanks a lot Simion!

DaveS
tagDiv Member

Hi Catalin,

I’m using a child theme with custom functions.php where the following was added in order to show 3 products per row + sidebar on desktop instead of the default 4:

function new_loop_shop_per_page( $cols ) {
// $cols contains the current number of products per page based on the value stored on Options -> Reading
// Return the number of products you wanna show per page.
$cols = 15;
return $cols;
}

// Change number or products per row to 3
add_filter(‘loop_shop_columns’, ‘loop_columns’);
if (!function_exists(‘loop_columns’)) {
function loop_columns() {
return 3; // 3 products per row
}
}

The thing is – the number of products per page on mobile also changed to 15 and so the last row on every category page contains only one product.

DaveS
tagDiv Member

For example: On desktop I had 4 products per row (I think that’s by default) and was able to successfully change it to 3 products per row using the suggested code in functions.php. I changed the total number of products per page to 15 (3×5).

But on mobile, there are 2 products per row by default. After changing the total number of products per page, on mobile there’s 1 product on the last row of each page. This doesn’t look nice.

Any ideas how to change the total number of products per page on mobile or how to switch from 2 products per row to 1 product/row on mobile? Both are possible solutions.

Thanks!

DaveS
tagDiv Member

This solution works only for desktop: https://wordpress.org/plugins/woocommerce-products-per-page/

How about changing the number of products per page on mobile?

DaveS
tagDiv Member

That way I lose the sidebar on archive pages too, which is not what I want.

DaveS
tagDiv Member

I have the same problem. My main shop page (with woocommerce products) got broken after the most recent theme update.
I never had a sidebar on this page, but now there’s a place reserved for a sidebar.

DaveS
tagDiv Member

Already tried to disable all plugins one by one – nothing changes

DaveS
tagDiv Member

Now everything is updated on the main theme incl. plugins, but the child theme still shows Newspaper 7 and the site isn’t working. Please advice!

DaveS
tagDiv Member

I downloaded the latest version and installed it, but visual composer isn’t updated to the latest version. My child theme is still showing Newspaper 7 and the site isn’t working.

DaveS
tagDiv Member

Note: It isn’t auto updated to 8.1. It is still on 8. Still not working

DaveS
tagDiv Member

Cheers for that, it works! Thank you Simion!

DaveS
tagDiv Member

Thanks, Simion, much appreciated!
It works, and it fixes the issue even when 4 products per row are set, but only on desktop. On a mobile the products are displayed like this – 1 product per row and diagonal (chess layout).

DaveS
tagDiv Member

As always – big thanks, Simion! It works on my end.

Cheers

DaveS
tagDiv Member

It actually helped! Thanks a lot for your support, much appreciated!

DaveS
tagDiv Member

Hi Catalin,

I raised all php parameters, but this didn’t solve the issue. I have not tried stopping all plugins etc, because it’s currently impossible… But the hosting company suppose that the issue comes from the theme..

DaveS
tagDiv Member

Hi Bogdan,

In fact, all already made redirects function properly. If I make a new redirect, it works properly.

If you put the test link directly in your browser url field and load it, you will be properly redirected. But when you click the tag element, you aren’t redirected.

The link I gave you for tests is now correctly redirected using 301 redirect to the desired url. Can you deny it?

I don’t think that the problem is with the plugin. I really hoped to be able to fix this with your support.

I made a lot of custom redirects during the years using the Redirection plugin.
I’m afraid that I will get in a trouble if I remove it….

Thanks

DaveS
tagDiv Member

Hi Catalin,

there’s no caching plugin or similar. Did you test with online redirect checker? What is the result? When you click on the tag and the page loads, then please click within the browser url filed and press Enter. What happens?

Thanks

DaveS
tagDiv Member

Hi Catalin,

could you please try once again to recreate the issue?
I made a further redirection and now an online redirect checker should show a 301 redirect. However I’m not redirected when I click on the tag in question from the post in question. Please check again and let me know if you can help.

Thanks

DaveS
tagDiv Member

Hi Bogdan,

I sent an email with login details.

Thanks

DaveS
tagDiv Member

Hi Catalin,

You say that you can’t recreate my issue – So you mean that when you click on the tag link you are properly redirected?

Thanks

DaveS
tagDiv Member

Hi Catalin,

I sent an email with login details.

Thank you

Viewing 25 posts - 26 through 50 (of 161 total)