Ambrosite Next/Previous Post Link Plus
Varying num_results (2 posts)

  1. Pereira
    Posted 3 years ago #

    I was wondering if there was a way to vary the number of results for previous posts according to the results i get from next posts.

    For example, I want to always have 6 results total. So, if there are no next posts, i should get a result of 6 previous posts. If there is only 1 next post, I should get 5 previous posts, and so forth.

    Any ideas?


  2. ambrosite
    Plugin Author

    Posted 3 years ago #

    In order to do this, I would have to query the database twice, since the number of next posts is not known until after the query is run, and that information is needed to get the correct number of previous posts. I probably would not add this feature into the plugin, since it would double the execution time and increase the load on the database. If you want to contract me to write custom code for you, contact me off-forum.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ambrosite Next/Previous Post Link Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic