• Hello i have a problem with Navigation in wordpress. Not display navigation nor with plugin or with the code (wp core functions navi). I read and the problem is in the index.php but I have no idea what to do. Please help me .
    Look my index code :

    <?php get_header(); ?>
    
    <div id="page-wrap">
              <div id="main">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <?php
         // get the src of the post thumbnail
         $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 300,300 ), false, '' ); 
    
         $thumbnailSrc = $src[0]; 
    
    	 //uncomment below to see source:
    	 //echo $src[0];
    	 //or
    	 //var_dump($src);
    ?>
    
    <div class="post">
    
    					<a href="<?php the_permalink() ?>"><img class="afis" src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $thumbnailSrc; ?>&w=215&h=110&zc=1" alt="<?php the_title(); ?>"></a>
    
    <div class="info">
    <?php the_title(); ?>
    </div>
      </div>
    
    <?php endwhile; ?>
    <?php if (function_exists('wp_corenavi')) wp_corenavi(); ?>
    <?php else : ?>
    <center><img src="<?php bloginfo('template_directory'); ?>/images/404.png" /></center>
    <?php endif; ?>
    
    </div>
    
    <?php get_sidebar(); ?>
    
    </div>
    
    <?php get_footer(); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Daniel Sorin

    (@moviemro)

    This is code in functions.php wp_corenavi

    <?php
    function wp_corenavi($pages = '', $range = 5) {
    $showitems = ($range * 2)+1;  
    
         global $paged;
         if(empty($paged)) $paged = 1;
    
         if($pages == '')
         {
             global $wp_query;
             $pages = $wp_query->max_num_pages;
             if(!$pages)
             {
                 $pages = 1;
             }
         }   
    
         if(1 != $pages)
         {
             echo "<div class='pagenavi'>";
             if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>&laquo;</a>";
             if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>&lsaquo;</a>";
    
             for ($i=1; $i <= $pages; $i++)
             {
                 if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
                 {
                     echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>";
                 }
             }
    
             if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>&rsaquo;</a>";
             if ($paged < $pages-1 &&  $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>&raquo;</a>";
             echo "</div>\n";
         }
    }
    ?>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Which navigation?

    Thread Starter Daniel Sorin

    (@moviemro)

    in page

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Navigation problem’ is closed to new replies.