Support » Themes and Templates » Problem adapting my older index.php

  • 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!

Viewing 7 replies - 1 through 7 (of 7 total)
  • And I am no geek and have trouble understanding anything about php…

    Moderator Michael Adams (mdawaffe)



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



    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>
    <html xmlns=””>

    <head profile=”″>
    <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>

    Tell me if you want more…



    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.

    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…

    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.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem adapting my older index.php’ is closed to new replies.