• Hey Everyone,
    Need a bit of help, I’m trying to go beyond the regular next/previous page navigation using next_posts_link and preivous_posts_link on archive pages.

    I’m trying to build a “Load More” feature that’s seen on sites like Twitter, Facebook, etc. I’m using jQuery load to make that happen. Currently, if I use the load feature to fetch content from the following page, it fetches the entire page, making it slow.

    I was looking at this other site and had an idea. These folks use a similar technique but do a smart trick.

    Try clicking on load more at the bottom.
    https://10k.aneventapart.com/

    Instead of fetching the next set of items from the following page that has a bunch of unnecessary HTML, they created a striped down template for only the important content.

    The load more feature is fetching data from requests to a template like this:
    https://10k.aneventapart.com/Page/recent/4

    In WordPress, I have a archives template for a reviews section.
    https://example.com/category/reviews/

    Is there a way I can create a custom template that also fetches data from the respective query but only shows the necessary content area?

    I’ve got the theming, ajax, all figured out. I only need help with how to setup a special template type that would support fetching ajax content, so i can fetch content from URL that I can easily manipulate.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Special Template Type For Ajax "Show More Posts" Feature’ is closed to new replies.