I am making a wordpress site but i need little help,
What I have is a function with Next and Previous buttons to list projects, but when i go to the last project the Next button is gone.
What I want to do is, when I go to the last project I hit "Next" and direct me to the first project something like loop slide
Here is my code:
<?php if (has_term( 'type-1', 'projecttype' ) ) { ?>
<div class="holder">
<?php if ( have_posts() ) : ?>
<div class="container-fluid">
<div class="project-paginat">
<?php if(get_post_meta($post->ID, "_type", true)){ ?>
<ul class="list-inline">
<li><a href="<?php echo get_home_url(); ?>/our-work">Back to Our Work</a></li>
<li>>> <?php echo get_post_meta($post->ID, "_type", true); ?></li>
<li><?php previous_post_link('%link', '< Previous Project', true, '', 'projectcategory') ?></li>
<li><?php next_post_link('%link', 'Next Project >', true, '', 'projectcategory') ?></li>
</ul>
<?php } else {
echo '<p>There Is No Project Type To Display.</p>';
} ?>
</div>