WordPress.org

Ready to get started?Download WordPress

Forums

Problem adapting my older index.php (8 posts)

  1. ccf
    Member
    Posted 9 years ago #

    I have successfully upgraded to WP 1.5 from 1.2.2 insofar as I can see my blog with the classic theme. I followed the indications on upgrading old templates, have modified my old index.php and renamed and modified my old stylesheet to style.css, and when I try to choose mytheme, I get the following error message
    Parse error: parse error, unexpected '<' in /home/ccf/covonet/wp-content/themes/mytheme/index.php on line 3
    I need help!

  2. ccf
    Member
    Posted 9 years ago #

    And I am no geek and have trouble understanding anything about php...

  3. Michael Adams (mdawaffe)
    Member
    Posted 9 years ago #

    What do the first few lines of that file look like?

  4. ccf
    Member
    Posted 9 years ago #

    Here:

    <?php

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/1">
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

    Tell me if you want more...

  5. Avenir
    Member
    Posted 9 years ago #

    <?php

    <!DOCTYPE

    The < beginning line 3 is the problem. You've included some HTML, but haven't closed the preceding PHP tag, so the PHP parser is getting angry. < is a special character in PHP and can only be used in certain places, and because the server still thinks its reading PHP and this isn't one of those accepted places, it throws you an error. What you'll need to do is remove the <?php at the top.

  6. ccf
    Member
    Posted 9 years ago #

    Thanks, I did that. Now, what I get is what used to be my right sidebar on the left, and underneath, the contents of the blog... But the stylesheet isn't working... I feel stupid and wonder if I shouldn't have stuck to 1.2.2...

  7. ccf
    Member
    Posted 9 years ago #

    OK I finally did it. I have Podz to thank as it was thanks to his detailed description that I finally managed adapting my index.php and stylesheet.

  8. Paolo
    Member
    Posted 8 years ago #

    Could you elaborate on what you actually did to fix it?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.