[resolved] Custom Theme, Parse Error (5 posts)

  1. thisheartx
    Posted 9 years ago #

    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!

  2. Joni
    Posted 9 years ago #

    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.


  3. MichaelH
    Posted 9 years ago #

    See if that works:


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

    [oops, joni got there quicker]

  4. thisheartx
    Posted 9 years ago #

    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.

  5. thisheartx
    Posted 9 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic