Looking for some help with a little problem I have with an existing website. The website is
http://broadcasttools.com. The problem is with how the "Manuals" list is displaying (or not displaying, as is the case).
If you look here - http://broadcasttools.com/manuals/page/5/ you can see there are 54 manuals to be displayed, but only 50 are viewable. You can not navigate to the 6th page, even though it does exist (http://broadcasttools.com/manuals/page/6/)
Here is the .PHP code. I'm sure it's something to do with the interval or rounding of of the integer value, but I can't sort it out.
<?php if($dis == ''){?>
<div class="row">
<div class="col-md-12 navigation_cont">
<?php
$startpost=1;
$startpost=10*($paged - 1)+1;
$endpost = (10*$paged < $wp_query->found_posts ? 10*$paged : $wp_query->found_posts);
?>
<div class="col-md-4">
<h5 class="displayResult">Showing results <?php echo $startpost; ?> - <?php echo $endpost; ?> of <?php echo $wp_query->found_posts; ?></h5>
</div>
<div class="col-md-7">
<div class="navigation">
<?php
$cur_page = get_query_var('paged');
$total_man = $wp_query->found_posts;
$inetval = 10;
$no_of_page = round($total_man / $inetval);
for($i = 1; $i <= $no_of_page; $i++ ){
if($cur_page == $i ){ $cls ='active'; }else{$cls ='';}
?>
<div class="nav_page <?php echo $cls; ?>"><a href="<?php echo site_url().'/manuals/page/'.$i; ?>"><?php echo $i; ?></a></div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } else { ?>
<div class="row">
<div class="col-md-12 navigation_cont">
<?php
$startpost=1;
$startpost=10*($paged - 1)+1;
$endpost = (10*$paged < $wp_query->found_posts ? 10*$paged : $wp_query->found_posts);
?>
<div class="col-md-4">
<h5 class="displayResult">Showing results <?php echo $startpost; ?> - <?php echo $endpost; ?> of <?php echo $wp_query->found_posts; ?></h5>
</div>
<div class="col-md-7">
<div class="navigation">
<?php
$cur_page = get_query_var('paged');
$total_man = $wp_query->found_posts;
$inetval = 10;
$no_of_page = round($total_man / $inetval);
for($i = 1; $i <= $no_of_page; $i++ ){
if($cur_page == $i ){ $cls ='active'; }else{$cls ='';}
?>
<div class="nav_page <?php echo $cls; ?>"><a href="<?php echo site_url().'/manuals/page/'.$i.'/?pro=dis'; ?>"><?php echo $i; ?></a></div>
<?php } ?>
</div>
</div>
</div>
</div>
<?php } ?>
Thank you.
Guy D. Corp
grafixCORP