Support » Plugin: TBTestimonials » [Plugin: TBTestimonials] Add "limit" parameter to Category Listing mode

  • Resolved Jan van Dank

    (@bugmenot2)


    Small feature suggestion: Add a “limit” parameter to the Category Listing mode. So if I have 15 testimonials in a category I can tell the plugin to only display e.g. the first 3 ones.

    How to implement it: Insert 'limit' => '-1', on line 411 of “tb-testimonials.php”. Then on line 514 replace 'posts_per_page' => '-1', with 'posts_per_page' => $limit,. Done!

    I hope you will add this feature to the next release. 🙂

    Regards,
    Jan

    http://wordpress.org/extend/plugins/tb-testimonials/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Travis Ballard

    (@ansimation)

    Jan, consider it added. Can’t promise which version, but it’s on the long list. Also you might be interested in some ajax pagination I put together for another user, you can find it here http://pastebin.com/CaaKV5Cq

    Thanks,
    Travis Ballard

    Plugin Author Travis Ballard

    (@ansimation)

    Also, here’s how you would use those added template tags to do the pagination

    {% if paged %}
    <p>Testimonials Page <em>{{ paged }}</em></p>
    <div id="testimonials-page-{{ paged }}">
      {% for testimonial in testimonials %}
      <p>{{ testimonial.post_title }}</p>
      {% endfor %}
    </div>
    <div class="testimonial-pagination">
      {% if prev_testimonial_link %}
      <p class="l"><a href="{{ prev_testimonial_link }}">Prev</a></p>
      {% endif %}
      {% if next_testimonial_link %}
      <p class="r"><a href="{{ next_testimonial_link }}">Next</a></p>
      {% endif %}
    </div>
    {% endif %}

    Travis, I have just started to use the TBTestimonial plugin. I need the output to show category-wise limited to 5 per page. I was trying to do the pagination. I have seen the code given on here http://pastebin.com/CaaKV5Cq , but I am not sure how to use it? where to embed it? and how the output will show pagination and where the pagination code above will need to be pasted? Please help me on this issue or guide me or provide some tutorial to do it myself. Thanks

    Plugin Author Travis Ballard

    (@ansimation)

    bansalnaveen: have you figured this out yet? if not use the TB icon in your admin bar to send me an email.

    Thanks,
    Travis

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: TBTestimonials] Add "limit" parameter to Category Listing mode’ is closed to new replies.