WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] PHP code displayed at end of page and feed (8 posts)

  1. jimrob
    Member
    Posted 5 years ago #

    I recently upgraded from 2.1, and now the following PHP code is being displayed at the end of my pages and RSS feed:

    p-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require('./wp-blog-header.php'); ?>

    Anyone know what's causing this? It isn't affected by what theme I use.

  2. Samuel B
    moderator
    Posted 5 years ago #

    likely you just messed up the code when you modified it
    just upload a fresh footer.php and back up as you modify

  3. jimrob
    Member
    Posted 5 years ago #

    The footer.php in my theme? I tried that, but it didn't solve the problem. Also, it does this regardless of theme.

    Another thing I noticed - When I attempt to select a new theme it displays that code rather than what the page would look like in the pop-up preview window.

    I may try to re-upload all the files and see what that does.

  4. Samuel B
    moderator
    Posted 5 years ago #

    then it almost has to be a plugin
    ??

  5. jimrob
    Member
    Posted 5 years ago #

    Deactivated all my plugins, still there. I'm going to re-upload the wp-includes and wp-admin files and see what happens.

  6. jimrob
    Member
    Posted 5 years ago #

    Well, I deleted all old files and re-uploaded everything. The code is still being displayed. (I cleared my cache to make sure I wasn't looking at an old version.)

  7. Kalessin
    Member
    Posted 5 years ago #

    The first part of the string seems to refer to wp-blog-header.php which is called from the index.php file. Try re-uploading the index.php from the WordPress zip file.

  8. jimrob
    Member
    Posted 5 years ago #

    Thanks Kalessin, that fixed it. I deleted index.php from the server and uploaded a freshly downloaded copy, which removed the code. I wonder if there was an error when I extracted it the first time?

Topic Closed

This topic has been closed to new replies.

About this Topic