Support » Fixing WordPress » Custom Theme, Parse Error

  • Resolved thisheartx


    I know alot of people have these types of mistakes and I thank you in advance for helping me. This is my first theme to write myself and of course I would get errors. 🙂

    I get this error:

    Parse error: syntax error, unexpected $end in /home/boobies/public_html/wp-content/themes/buzz/index.php on line 22

    And this is my index code:

    Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Looks like parts of this are missing:

    <?php endwhile; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>

    Substitute the above for what you have:
    <?php endwhile; ?>

    And see if that helps. There should be no need for hard-coded breaks after the division. Simply add bottom padding to the division (which should have a class assigned and be in your stylesheet, not in your template).

    And to be XHTML-compliant, the breaks should be written as <br /> and NOT <br>. But I’m getting off topic here.


    See if that works:

    just added two semicolons to the Previous and Next Entries lines and the endif line.

    [oops, joni got there quicker]

    Thank you, that worked. And now my css is not working, so I guess I have to tweak that.

    And on my index, I show that my breaks are written correctly. But thank you.

    I put my style in the theme folder when it was supposed to be in the main directory of my site. So now it is fixed now. Thank you for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Theme, Parse Error’ is closed to new replies.