How to disable this navigation feature?
]]>For instance, when one clicks on the earliest post in Category A, the previous post link takes you to the last post in Category B and the next post link takes you to the first post in Category C.
The code in the archive,php file is
<ul class="pager">
<?php if( get_previous_posts_link() ) : ?>
<li class="previous"><?php previous_posts_link(); ?></li>
<?php endif; ?>
<?php if( get_next_posts_link() ) : ?>
<li class="next"><?php next_posts_link(); ?></li>
<?php endif; ?>
</ul>
I found an article online that had code that would segregate the previous-next by category:
<ul class="pager">
<?php if(get_previous_post_link( $format, $link, $in_same_term = true, $excluded_terms = '', $taxonomy = 'category' ) ) ?>
<li class= "previous"><?php previous_posts_link(); ?></li>
<?php enddif; ?>
<?php if (get_next_posts_link( $format, $link, $in_same_term = true, $excluded+terms = '', $taxonomy = 'category' ) ) ?>
<li class= "next"><?php next_posts_link(); ?></li>
<?php endif; ?>
</ul>
I took a copy of archive.php from my parent theme, edited with the second set of code and tried it. I got an error.
So obviously something is wrong and I am not knowledgeable enough to know what, or what I should do.
I’d appreciate some guidance.
]]>get_previous_post(TRUE, '', 'menu');
I am using the above code to show previous link and similarly for next link too.
In the ‘last post’ in any category, there is no ‘next’ link shown.
I want to show the first post of the ‘next’ category. Help me with tips to get this done. Thanks.
]]>I have searched for quite a while and all I can seem to find is keeping the prev/next links within the same category or tag – but not date.
Thank you for your help
]]>Please see URL: https://caspca.org/wordpress/event/crafts-for-critters/
For the previous/next links, the actual name of the event is displayed. I don’t think this is terribly intuitive to the viewer. I would like to replace the event titles with more generic “previous event” and “next event” links. Can someone tell me how?
Thank you,
John
]]>I searched the forums and found the following code to be placed after endwhile… I tried it on both page.php and single.php:
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>
And in the same post the following code to by in the stylesheet:
.navigation
{
display:block;
width:100%;
}
.alignleft
{
float:left
}
.alignright
{
float:right;
}
Yet, placing these two snippets doesn’t add previous/next links to the pages with posts on them…
So I’m wondering if I have the first snippet in the wrong template file or if I’ve got the style code in the wrong place in that template… Or if I’ve missed something completely and have the wrong snippets entirely.
Any help is greatly appreciated.
]]>Does anyone know how to do this?
Thank you very much.
]]>