• Looks like this:

    <div id="currentcategory">
    	<div id="thepost"> <! -- the newest post -->
    		<a class="alignleft" href="https://site.com/currentcategory">Back to Current Category Page</a>
    		<?php next_post_link('%link', 'Next post in category', TRUE); ?>
    	</div>
    	<div id="thepost">
    		<?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    		<?php next_post_link('%link', 'Next post in category', TRUE); ?>
    	</div>
    	<div id="thepost">
    		<?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    		<?php next_post_link('%link', 'Next post in category', TRUE); ?>
    	</div>
    	<div id="thepost"> <! -- the oldest post -->
    		<?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    		<a class="alignright" href="https://site.com/currentcategory">Back To Current Category Page</a>
    	</div>
    </div>

    How do I show “back to category” only in oldest and newest post in a specific category.

    [Moderator Note: No bumping, thank you.]

  • The topic ‘Insert Element only to newest and oldest post.’ is closed to new replies.