• Resolved pandorasan

    (@pandorasan)


    Hi,

    I use newest Hueman 1.5.1 with child theme. Newest WP 4.1.1
    I would like to have the previous and next navigation only browse in current category.

    I created /inc/post-nav.php in child theme folder and edited like this :

    <?php if ( is_single() ): ?>
    	<ul class="post-nav group">
    		<li class="next"><?php next_post_link('%link', '<i class="fa fa-chevron-right"></i><strong>'.__('Next story', 'hueman', TRUE).'</strong> <span>%title</span>'); ?></li>
    		<li class="previous"><?php previous_post_link('%link', '<i class="fa fa-chevron-left"></i><strong>'.__('Previous story', 'hueman', TRUE).'</strong> <span>%title</span>'); ?></li>
    	</ul>
    <?php endif; ?>

    I was in the understanding of adding TRUE would make it nav in current category. Am I mistaking syntax, or does this need to be fixed in functions.php

    Thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello there pandorasan, i had the same problem as you,you are putting in the wrong place, it should be after the “</span>'”

    like this :

    <li class=”next”><?php next_post_link(‘%link’, ‘<i class=”fa fa-chevron-right”></i>‘.__(‘Next story’, ‘hueman’).’ <span>%title</span>’, TRUE); ?>
    <li class=”previous”><?php previous_post_link(‘%link’, ‘<i class=”fa fa-chevron-left”></i>‘.__(‘Previous story’, ‘hueman’).’ <span>%title</span>’, TRUE); ?>

    just copy and past and you should be ok

    Thread Starter pandorasan

    (@pandorasan)

    @jlarisch

    Worked perfect, thanks a lot !

    Hi pandorasan. If you’ve solved your issue please mark the topic as resolved. Thanks.

    Thread Starter pandorasan

    (@pandorasan)

    solved

    you are welcome @pandorasan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘want previous and next story only in same category’ is closed to new replies.