Forums

HELP - Dividing Terms/Tags Into Pages (1 post)

  1. kcav
    Member
    Posted 11 months ago #

    I have programming in place that when a special short code is detected, the page will list all tags of a specific taxonomy - by way of the WordPress "get_terms" function. It works great, but the problem I am having is that there are over 200 tags being returned, which is too much for one page.

    I also have PageNavi Plugin installed that works great for pages and posts.

    Is there any way I can use PageNavi in conjunction with "get_terms" to display tags in say pages of 40 at a time?

    I know "get_terms" allows attributes for maximum number of terms to return, and number by which to offset... so if I want 40 per page, I know through simple math that:

    - number=40,offset=0 would be page 1
    - number=40,offset=40 would be page 2
    - number=40,offset=80 would be page 3

    ... and so on. But how would I set this up so that it works with PageNavi Plugin (so the page styling matches the rest of the site) and then calculates the offset based on the page number.

    Any help someone can provide would be greatly appreciated.

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 11 months ago by kcav
  • This topic is not a support question
  • WordPress version: 3.1.3