0

See this reference site: http://alwaysjudging.com/archive/ It's loading new posts on scroll down, similar to Infinte Scroll plugin. (But I'm unable to get the Jetpack Infinite Scroll plugin to work on a static "archive" page using a query of posts, so I saw this instead.)

Ho would I implement this feature on a page?

When I view the source of the referne site above, it shows the script is loaded here: http://alwaysjudging.com/assets/js/scripts.min.js

It appears that the selector involves ".post-nav" and ol li tags.

I'm a front end developer, so my knowledge of actually writing Javascript and PHP is very limited. If you can explain how I can use this to work on my website single page it would be greatly appreciated. I think it would also be useful for all those people who can't use Infinte Scroll plugin to load posts on an Archive page also. Thank you for any guidance you can offer.

  • If this is about Jetpack then it's off topic and should be asked on the wp.org Jetpack plugin support forums. If not, please show what you already tried. – kaiser May 26 '14 at 23:36
  • No, this is not about the plugin. I was just saying that I tried the plugin with no avail. Looking for a solution using javascript, jquery or something similar to what is used at alwaysjudging.com/archive – melissa May 28 '14 at 17:52
  • Have you searched the site? There already are some questions about that topic. – kaiser May 28 '14 at 18:07
1

In order for this kind of effect to work, the jquery plugin needs to 'know' which html tag to insert additional post into as child elements. The loading is done using Ajax calls.

If you look at the JetPak Infinite Scroll plugin doc page, it instructs you how to achieve this. In order for it to work out-of-the-box, your theme needs to be designed with support for this plugin by having the right CSS ids/html elements included in the page to work.

It shouldn't be too difficult to get it work if you have a little knowledge of html/css.

Alternatively you can also look at trying similar plugins which might support your theme out of the box, such the Infinte-scroll plugin, (wordpress.org/plugins/ajax-load-more/, sorry this site does not allow more than 2 links ...)

There is also this plugin which works with shortcodes in pages, I haven't tried it, but if it actually embeds its own post container into the page, then it takes cares of all the css/element settings for you, however, you may need to tweak the css to make it blend in properly into your theme.

-2

You can use the normal post loop given by WordPress in widgets. You can set it to 1000-2000 post per page.

Now if you want an optimized website, you can install ajax loader plugin for WordPress which will help you creating a successful infinite scroll on your web. For more query visit 3nions

  • Sorry, but this is even less than a link (which would be already discouraged). Please read How to Answer in the help center and edit your answer with something helpful. Thanks. – kaiser Feb 29 '16 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.