Webpage Post Navigation Code
How to Webpage Post Navigation ?
Post navigation typically refers to the previous and next post links that appear at the end of a blog post, allowing readers to easily navigate between posts. Here's an example code snippet for post navigation links using WordPress functions:
<div class="post-navigation">
<div class="previous-post-link">
<?php previous_post_link('%link', '« Previous Post'); ?>
</div>
<div class="next-post-link">
<?php next_post_link('%link', 'Next Post »'); ?>
</div>
</div>
This code displays the previous and next post links using the WordPress previous_post_link() and next_post_link() functions. The %link parameter displays the link to the previous or next post, and the text inside the quotes is the text that appears for the link.
You can customize the CSS for the .post-navigation, .previous-post-link, and .next-post-link classes to fit your specific design needs.
Other blogger code:
<ul class='post-nav'>
<li class='post-next'>
<b:if cond='data:newerPageUrl'>
<a class='next-post-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' rel='next'>
<div class='post-nav-inner'><span><data:messages.newer/></span><p/></div>
</a>
<b:else/>
<a rel='next'><div class='post-nav-inner post-nav-active'><span><data:messages.newer/></span><p><data:post.title/></p></div></a>
</b:if>
</li>
<li class='post-prev'>
<b:if cond='data:olderPageUrl'>
<a class='prev-post-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' rel='previous'>
<div class='post-nav-inner'><span><data:messages.older/></span><p/></div>
</a>
<b:else/>
<a rel='previous'><div class='post-nav-inner post-nav-active'><span><data:messages.older/></span><p><data:post.title/></p></div></a>
</b:if>
</li>
</ul>
</b:includable>
<b:includable id='postPagination'>
<div class='blog-pager container' id='blog-pager'>
<b:include cond='data:newerPageUrl' name='previousPageLink'/>
<b:include cond='data:olderPageUrl' name='nextPageLink'/>
<b:include cond='data:view.url != data:blog.homepageUrl' name='homePageLink'/>
</div>
</b:includable>
<b:includable id='postReactions'>
<span class='byline reactions'>
<span class='reactions-label'>
<data:byline.label/>
</span>
<iframe allowtransparency='true' class='reactions-iframe' expr:src='data:post.reactionsUrl' frameborder='0' name='reactions' scrolling='no'/>
</span>
</b:includable>
<b:includable id='postRelated' var='post'>
Comments
Post a Comment
Thanks for your Comments.