• Resolved tcgwebdesign

    (@tcgwebdesign)


    We have an archive of about 130 posts. We have a pre-get_posts filter using url parameters that match a logged-in user’s criteria, so a user may only see like 20 posts out of the entire lot of 130. I am hoping to display the number of posts that are currently displaying on the page (i.e. 20) or ideally, “20 of 130”. Any ideas on this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Starr

    (@specialk)

    It depends, what is the “pre-get_posts filter” doing, specifically?

    Thread Starter tcgwebdesign

    (@tcgwebdesign)

    We have an ACF field “requirements” on posts. We are using the get params to pull user meta to make a URL that looks something like example.com/archive/?management=Manager&role=Accountant&job=Finance. The pre-get_posts filter is then looking at the parameters in the URL and searching (working on this part) either matching terms in the “requirements” ACF field or matching meta on the posts itself. Then it displays only results that match the params in the url.

    Plugin Author Jeff Starr

    (@specialk)

    Okay thanks. That’s not gonna be something the plugin can count at this time. Maybe check for other stats type plugins or just custom code something, if possible.

    Let me know if any further questions, glad to help anytime.

    Thread Starter tcgwebdesign

    (@tcgwebdesign)

    Thanks, Jeff! Appreciate the quick response. Still enjoying using the “users currently online” count feature!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display the current number of posts on a page?’ is closed to new replies.