Amount of products displayed on store page

ThemeBurn SupportForumsWordPress ThemesShoppica WordPress ThemeAmount of products displayed on store page

This topic has been marked as resolved.

Hi,
I want to start by saying thank you for a great theme.

On my store page, you can filter the amount of products to be displayed.

By default, my settings is on 12 products. I have changed a line in archive-product.php to:

$options = array(16,24,48,60);

Because i want to be able to show 16, 24, 48 & 60.

After i did this it still shows 12 but when i change the filter to 16 the option “12″ dissapears. But as soon as i go to the main store page it goes back to 12 displayed products.

So I googled a little bit and added this code snippet to the functions.php

add_filter( ‘loop_shop_per_page’, create_function( ‘$cols’, ‘return 16;’ ), 20 );

And it works. Now it shows 16 by default and you cannot change to 12 in front end.

HOWEVER, when you go to the store, on the filter it is displayed as “12″ when in fact it is 16 products. Please tell me how I can remove this from my theme. I cant find it in any other file.

Go to nordmed.se/butik to see the issue. Please help :)

Thank you,
Daroun Nehro
Sweden

  • This reply was modified 3756 days ago by  HMF.
  • This reply was modified 3756 days ago by  HMF.
  • This reply was modified 3756 days ago by  HMF.
  • This reply was modified 3756 days ago by  HMF.
  • This reply was modified 3756 days ago by  HMF. Reason: some code snippets were not showing
 HMF
February 6, 2014 at 12:14 am #30322

I had to remove the code in the functions.php file -> add_filter( ‘loop_shop_per_page’, create_function( ‘$cols’, ‘return 16;’ ), 20 );

It disabled all the other options (24, 48, 60), it could only display 16 with this code.

 HMF
February 6, 2014 at 12:23 am #30328

Hi,

We will need the admin access, so we can check.

You can use hidepost to share private information with the support staff.

Best,
ThemeBurn team

February 6, 2014 at 10:01 am #30333

Hello, to access my site you need….

Thanks for the help!

 HMF
February 7, 2014 at 9:54 pm #30385

Hello,

We have changed your default products to 16, and modified your archive-product.php file. Is this what you are looking for?

Please make backup of archive-product.php

Best,
ThemeBurn team

February 11, 2014 at 10:26 am #30453

Yes, this is how i wanted it to be like. Thanks! :)

 HMF
February 11, 2014 at 10:43 am #30461

Glad, we’ve helped.

If you like Shoppica and our support, we will appreciate your rating at ThemeForest :)

Best,
ThemeBurn Team

February 11, 2014 at 10:55 am #30465
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.