• Resolved NomadMik

    (@nomadmik)


    Hello,

    I made the mistake of trying to install the WP Page Numbers plug-in. The instructions said to replace

    the ‘next_posts_link()’ and ‘previous_posts_link()’

    with

    <?php posts_nav_link(‘ — ‘, ‘‹ Newer Posts’, ‘Older Posts ›’); ?>

    I did that and got the following error message on my web page: https://thedarktower.info/wp/wordpress/

    Fatal error: Call to undefined function: get_header() in D:\inetpub\vhosts\thedarktower.info\httpdocs\wp\wordpress\Index.php on line 1

    Then I undid the damage and changed it back…and I still get the error message. How do I restore this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Post the first lines of your index.php…

    Thread Starter NomadMik

    (@nomadmik)

    <?php get_header();?>
    <?php include (‘sidebar1.php’); ?>
    <div id=”content”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <div class=”postmetadata-top”><small><?php the_date(‘M d Y’); ?> <?php edit_post_link(); ?>
    Filed In: <?php the_category(‘, ‘); ?></small></div>
    <?php the_content(‘Read more ›’); ?>
    <div class=”backtotop”>Back to Top | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></div>
    <div class=”postmetadata-bottom”><small>Tags: <?php the_tags(”, ‘, ‘); ?></small></div>
    </div>
    <?php endwhile; endif ?>
    <div id=”navlink”>
    <?php posts_nav_link(‘ — ‘, ‘‹ Newer Posts’, ‘Older Posts ›’); ?></div>
    </div>
    <?php include (‘sidebar2.php’); ?>
    <?php get_footer();?>

    Thread Starter NomadMik

    (@nomadmik)

    Hello again,

    I just read this thread —–> Possibly deleted page.php…=)

    Apparently my problem was that there are three different index.php files in three different directories… I overwrote one of them with the wrong file.

    I followed the instructions in that thread and my page re-appeared.

    Yay!!!

    Thanks again all ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal Error when editing index.php’ is closed to new replies.