Support » Fixing WordPress » Custom Pagination on Custom Post Type

  • Okay – So I’m building a site which has a product listing. The products are categorised by category… But you can also categorise by supplier.

    So I have a custom post type called products and a custom post type called suppliers.

    When the user goes to one of the supplier pages, on that page it lists all the products that are made by that supplier. This is referenced with post meta data for each product having a supplier parent kinda thing.

    The issue I’m coming across is I only want to list 12 products per page for the suppliers (I have a custom loop). I have the loop sorted and everything else works fine… My issue is I can’t seem to pass the paged variable through on the supplier pages like I can on a normal archive page… My guess being because archive pages usually need the pagination anyway… So assuming it’s just a rewrite rule thing. But I’ve not done much with WordPress rewrite rules… So can’t figure out what rules I need to do to make it work.

    The URL structure would be like this:*suppliername*/page/*pagenumber*/

    The stuff with asterisks around it being the variable names.

    So an example url might be /suppliers/levo/page/2/… But by default it rewrites to /suppliers/levo/.

    Can anyone help?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Pagination on Custom Post Type’ is closed to new replies.