Page Nav / Sidebar
-
Hey Guys,
i try to separate some categories or posttypes from the “nex/previous post” on the top of the sidebar.
i tried to modify the post-nav.php
But if i add something to the php code – the full block is removed from the site.that is what i tried (i should mention, that i am a try-and-error php noob)
i added ‘post_format’ to show only posts with the same post-type.
result: block removed from the site.
<?php if ( is_single() ): ?>
<ul class=”post-nav group”>
<li class=”next”><?php next_post_link(‘%link’,'<i class=”fa fa-chevron-right”></i>‘.__(‘Next Story’, ‘hueman’).’ <span>%title</span>’,’post_format’); ?>
<li class=”previous”><?php previous_post_link(‘%link’,'<i class=”fa fa-chevron-left”></i>‘.__(‘Previous Story’, ‘hueman’).’ <span>%title</span>’); ?><?php endif; ?>
i also tried some of this instructions, with the same result
https://codex.wordpress.org/Function_Reference/previous_post_linki am sure, that i make a mistake and hope anyone can help me
The topic ‘Page Nav / Sidebar’ is closed to new replies.
