• Resolved oravaa

    (@oravaa)


    Help! I installed WP-Paginate-plugin. And as instructed, I updated the loop.php (theme twentyten 3.2.1). I copied the original code to notepad before making any changes (so I would have a backup). When I realized that I had made a small error with the update (page was still then working) I took out all the changes by pasting back the original code of loop.php. But my blog stopped working completely! All I see is the background but all content is gone. How do i get it back?? Dashboard works fine, posts and comments are there. So the content is not lost, it’s just not showing because i messed up the loop-php (previous & next post code lines especially).

    I know I messed up the loop-php, but I have no idea how to fix it. I mean, the code in loop.php is now again the 100% original (as it was before I opened it) but it still doesn’t work. I’m out of ideas. And I know absolutely nothing about php as you can see…

    I would appreciate all ideas.
    https://prettydisturbed.com/blog/

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you have a copy of the theme find the file before it was modified and then upload the single file via FTP or the ISP control panel.

    You could also put the loop code up on https://pastebein.com and paste the link in a reply.

    Also these posts on my website deal with wp-pagenavi for twenty eleven and twenty ten!

    HTH

    David

    Thread Starter oravaa

    (@oravaa)

    Hi David!
    Thanks for your help! I actually figured this out myself just 5 minutes ago, but your answer was the solution. Instead of just trying to paste back that one block of code, I pasted back the whole loop.php (every single line of code from an old file) and now it works again. Stupid me. I guess I just had accidentally messed up loop.php more than I realized and restoring the whole file from an old copy did the job.

    Great if you want to tackle it again!

    This is the whole block Twenty Ten, conditional code so if pagenavi is not active you get the normal output.

    Nav Above

    <?php /* Display navigation to next/previous pages when applicable */ ?>
    <?php if ( $wp_query->max_num_pages > 1 ) : ?>
     <div id="nav-above">
      <?php /* add page navigation to indexes */ ?>
      <?php if(function_exists('wp_pagenavi') ) : ?>
       <?php wp_pagenavi(); ?>
      <?php else: ?>
       <div "nav-previous"><?php next_posts_link( __( '<span>&larr;</span> Older posts', 'twentyten' ) ); ?></div>
       <div "nav-next"><?php previous_posts_link( __( 'Newer posts <span>&rarr;</span>', 'twentyten' ) ); ?></div>
      <?php endif; ?>
     </div><!-- #nav-above -->
    <?php endif; ?>

    Nav Below

    <?php /* Display navigation to next/previous pages when applicable */ ?>
    <?php if (  $wp_query->max_num_pages > 1 ) : ?>
      <?php /* add page navigation to indexes */ ?>
      <?php if(function_exists('wp_pagenavi') ) : ?>
       <?php wp_pagenavi(); ?>
      <?php else: ?>
        <div id="nav-below">
         <div class="nav-previous"><?php next_posts_link( __( '<span>&larr;</span> Older posts', 'twentyten' ) ); ?></div>
         <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span>&rarr;</span>', 'twentyten' ) ); ?></div>
        </div><!-- #nav-below -->
      <?php endif; ?>
    <?php endif; ?>

    HTH

    David

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loop.php broke – wordpress blog disappeared!’ is closed to new replies.