• Danmotlagh

    (@danmotlagh)


    my current product listing page shows only 5 product per page. I would like to increase the number to 9 or above using this code:

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

    However, for some unknown reason it does not work.

    Is it because the code is outdated or I’m missing something.

    Thanks in advance for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • swayam.tejwani

    (@swayamtejwani)

    Check once settings->reading in backend for “Blog pages show at most” setting option to set no. of products you want to display.

    Thread Starter Danmotlagh

    (@danmotlagh)

    Already did, but no changes. I think, there needs to be some codes to be added

    swayam.tejwani

    (@swayamtejwani)

    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );
    This code is working fine for me, It may be your theme issue, just activate default wp theme like twentyfourteen or twentyfifteen and check on shop page, if its working or try deactivating all plugins once and re-activate 1 by 1 and check.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘cannot change number of products per page’ is closed to new replies.