add next and prev post arrows
I want to create a simple one page storytelling wordpress website. I’ve created a category to hold all the posts that will be the main content for the stories and I want to display them on the homepage. I have for now the standard loop, but I want to load the contents using the REST API to avoid page reloads. My question is how I can add two arrows on the left and on the right to select a previous post of the category or the next one?
<php if( have_posts() ): while( have_posts() ): the_post(); the_title('<h1>','</h1>'); the_content(); endwhile; endif; // here I want to add the needed code and markup for the next and previous arrows. ?>
0pagination 3 years 2019-12-07T09:13:08-05:00 2019-12-07T09:13:08-05:00 0 Answers 79 views 0
Leave an answer