marketpress & gridmarket, change pagination on front page only

Hi there,
I'm playing around with Marketpress and Gridmarket. I've set up a "static" home.php that displays content plus the product organized by category, and I'm wondering where to target the code to change the pagination just for this front page. In my store settings, I want pagination to show 20 product per page, but on this front page I'd like only 8 per category. I know this may be a more complex development question, but any suggestions or help would be appreciated.

Also - for some reason - my home.php template is also being used for the blog page, even though in the admin panel I've set the blog to a different page with the gridmarket blog news template. I can't trace why, but I'm not the most advanced coder so I may have just set things up incorrectly.

You can view the development site here:

Please let me know what code you may need to see and I'll paste it. Thank you in advance.

  • aecnu
    • WP Unicorn

    Greetings Shannon Mac,

    Welcome to WPMU Dev!

    I looked at your web site and it looks like it is coming right along.

    Did you upload the child theme Grid Market solo outside of Frame Market to the themes folder?

    I do not know the coding for custom pagination as you have described.

    Therefore I'll see if I can get the lead developer of Grid Market theme in here to assist / give you some advice regarding the pagination question and coding required if possible.

    Thank you for being a WPMU Dev member!

    Cheers, Joe :slight_smile:

  • Shannon Mac
    • WPMU DEV Initiate

    Thanks Joe - I appreciate the help Yes, I did upload Grid Market solo outside of Frame Market. That's part of why I'm confused - trying to figure out all the overlapping between Grid Market, Frame Market, and MarketPress. :slight_smile:

  • Aaron
    • CTO

    To limit the products shown, you just need to change the $per_page argument to the listing template function. By default thats

     * function mp_list_products
     * Displays a list of products according to preference. Optional values default to the values in Presentation Settings -> Product List
     * @param bool $echo Optional, whether to echo or return
     * @param bool $paginate Optional, whether to paginate
     * @param int $page Optional, The page number to display in the product list if $paginate is set to true.
     * @param int $per_page Optional, How many products to display in the product list if $paginate is set to true.
     * @param string $order_by Optional, What field to order products by. Can be: title, date, ID, author, price, sales, rand
     * @param string $order Optional, Direction to order products by. Can be: DESC, ASC
     * @param string $category Optional, limit to a product category
     * @param string $tag Optional, limit to a product tag

    Though I think framemarket has it's own wrapper of this function (with same arguments) for the grid display.

    I'm not familiar with how home.php works with static front pages. This might help:

  • Shannon Mac
    • WPMU DEV Initiate

    Hi Aaron. Thanks for your assistance - I understand which argument I need to change, but I'm really not sure where to change it - I found it only in the marketpress.php file (not in framemarket too), but no matter where I define $per_page it doesn't change the output. Any suggestions?

    Thank you for the template link - I had read that ages ago and hadn't carefully processed it, and this time was able to fix my blog page problem.

  • Tammie
    • WordPress Wizard

    It should use the settings that MarketPress has which is a little weird it isn't. However, it could be the way it's being used. Can I ask why you are using a static page on front not just letting GridMarket show the products it does?

    As reference any function to do with MarketPress is actually under library/functions/marketpress.php - this is under the parent FrameMarket.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.