• Resolved Pedro

    (@igmosi)


    Hi guys!!

    My page navigation isn’t working since I changed the Blog URL. the core wordpress is https://www.igmosi.com/blog but it’s showed in https://www.igmosi.com. In the blog section, the links previous and next post doesnt work correctly, the page 1 is always showed.

    I reseted the .htaccess file, I have permalinks (blog/%postname%), … mi .htaccess is:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    I have no idea…Where is the problem??
    https://www.igmosi.com/blog

    Thank you!!
    -nacho

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

    (@igmosi)

    The problem is code php tha tI changed to style differently the first post. I copied the code from here, but I cant see where is the porblem.

    thnaks.
    -nacho

    the problem with that code is that it does not take pagination (the paged parameter for query_posts()) in consideration.
    and using the offset parameter does general not work well with pagination.

    checking this article might help:
    https://stylizedweb.com/2008/08/13/query_posts-pagination-problem/

    to style the first post different, you could use a different method that utilizes a counter variable to distinguish the first post (and only on front page);

    schematic:

    <?php $counter = 1;  ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
      <?php if(($counter == '1')&&!is_paged()) { ?>
        <?php // show the first post different ?>
      <?php } else { ?>
        <?php // show all other posts in their own way ?>
      <?php } ; ?>
      <?php $counter++; ?>
    
    <?php endwhile; else: ?>
    
    <?php endif; ?>
    Thread Starter Pedro

    (@igmosi)

    Thank you very much!!

    It fixed it!!!!

    -nacho

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