I am making a one page wordpress site. There is a section of the website displaying content via category posts. There is only one post displaying at a time and I am using the following default code to have Next/Prev links appear:
<div class="alignleft"><?php next_posts_link('« Next Recipe') ?></div> <div class="alignright"><?php previous_posts_link('Previous Recipe »') ?></div>
When the previous post is clicked, it loads the previous post properly, however since this is a one page site, it goes to the top of the page upon refresh.
Is there a way when that link is clicked, to make it refresh the page in the same location, or to target that I would like? Even better, a way to make this do a page refresh using AJAX? I've crawled google and haven't found anything.
I suppose this is similar: http://www.problogdesign.com/wordpress/load-next-wordpress-posts-with-ajax/, however I haven't been able to execute that with my custom theme.