post links at both top and bottom of category page
I would like to have the next and previous links that are at the bottom of my category page, both at the bottom and at the top. Can someone please tell me how and where to add the code so that I have these links show up at bottom and top of the post listings?
Thanks so much.Mod
Use a Graphene action hook widget. See this tutorial:
You will probably want to use the “graphene_after_post_content” action hook area in the “loop.php” file.
You will need to install the PHP widget as I mention in my tutorial.
Paste this code into a text widget:
<?php /* Posts navigation for single post pages, but not for Page post */ ?>
<?php if ( is_single() && ! is_page() ) : ?>
<div class="post-nav clearfix">
<p id="previous"><?php previous_post_link(); ?></p>
<p id="next-post"><?php next_post_link(); ?></p>
<?php do_action('graphene_post_nav'); ?>
<?php endif; ?>
I don’t have the time to test this, but it should work in theory. Let us know how it goes.
thank you so much for the response, I added in the hook like your tutorial suggested but what I end up with is the widget at the top of each individual post. I’d like to get the widget on the top of the category page so that the visitor doesn’t have to scroll to the bottom of the post listings to use the next or previous button. Can I use the hook in this case and if so, where would I put it?
Thanks for you help
- You must be logged in to reply to this topic.