hi.
i'm wondering if there's a way to add 'next' and 'prev' arrows or buttons in individual blog posts
so that people don't have to return to the main blog page and then scroll down to read the next blog post.
thanks!
site: mothdrawn.com
hi.
i'm wondering if there's a way to add 'next' and 'prev' arrows or buttons in individual blog posts
so that people don't have to return to the main blog page and then scroll down to read the next blog post.
thanks!
site: mothdrawn.com
Hey,
in your includes folder find loop-index.php, now find:
the_content(__('Read more →','avia_framework')); ?>
After this line you can paste this:
<?php previous_post_link('%link', 'Older Post', TRUE); ?>
This will link to older posts, a link to newer posts will be generated by this:
<?php next_post_link('%link', 'Newer Post', TRUE); ?>
thanks! :)
Glad that I could help you :)
Hi again. I did what you said and put the code in the loop-index. It shows on the individual blog posts, but it ALSO shows on the main blog page, which is cluttered and unnecessary. How do I get 'next' and 'prev' to show only on the individual blog posts?
thanks!
mothdrawn.com
Hey,
use following code instead:
<?php if is_single(){ ?>
<?php previous_post_link('%link', 'Older Post', TRUE); ?>
<?php next_post_link('%link', 'Newer Post', TRUE); ?>
<?php } ?>hi. i wish i could say that worked, but it made my whole blog turn into a blank page. when i took out the first and last lines of that code, it worked like before, so i guess there's something amiss with the <?php if is_single(){ ?> perhaps?
thanks for helping me with this!
courtney
mothdrawn.com
Hey,
there was a tiny mistake in Dude's if statement,
replace the code with this:
<?php if ( is_single() ) {
previous_post_link('%link', 'Older Post', TRUE);
echo " - ";
next_post_link('%link', 'Newer Post', TRUE);
} ?>
Let us know if it works :)
perfect! thank you so much!!
Glad that I could help you :)
You must log in to post.