Hi everyone,
I've a little problem and i really need you. I dev a website, and i want to exclude an ID (only use for the home) in next_post/prev_post, i search on the web and i've found:
<?php previous_post_link('« %link', '%title', FALSE, 'IDofCat'); ?>
But that's don't work in my case, i make a cat only for this post but still doesn't work. And i prefer to exclude it only with ID of post if it's possible. I need you guys ! My code here:
<?php while (have_posts()) : the_post(); ?>
<div class="container" id="singlePort">
<div class="row content">
<div class="col-md-1 col-sm-1"></div>
<div class="col-md-10 col-sm-10">
<div class="illuPort alignleft">
<img src="<?php the_field('illustration'); ?>" alt="<?php the_field('txt_alt'); ?>" class="img-responsive illustration" />
</div>
<div class="contentSinglePort">
<p class="topSinglePort"><span id="sector"><i class="fa fa-dot-circle-o"></i> <?php the_field('secteur'); ?></span><br/><a style="color: #4885d9;" href="<?php the_field('link_site'); ?>" TARGET='_blank'><i class="fa fa-link"></i> <?php the_field('link_site'); ?></a><p>
<?php the_content(); ?>
</div>
</div>
</div><!--/.row-->
<div class="row">
<p id="navigation">
<span id="previous"><?php previous_post('<i class="fa fa-angle-left fa-2x"></i> %', 'Projet précédent : ', 'yes', FALSE, '26'); ?></span>
<br class="hidden-lg hidden-md hidden-sm"/>
<span id="next"><?php next_post('<i class="fa fa-angle-right fa-2x"></i>%', 'Projet suivant : ', 'yes', FALSE, '26'); ?></span>
</p>
</div>
<?php endwhile; // end of the loop. ?>
PS: it's a custom post type so i don't know if you really care about that.
Best regards, have a nice day,
Jeyreem