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:
http://blog.kjodle.net/2011/11/04/graphene-action-hook-widgets-an-easy-way-to-modify-your-blog/
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'); ?>
</div>
<?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
figured it out. thanks so much for introducing me to the hook
I need to change the navigation option of the post to the bottom. The post_nav.
thanks
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
