Support » Themes and Templates » Theme Functions (functions.php) code messup

  • While trying to install a plugin that shows random images (, I accidentally changed something in line 2 of the WordPress Default template, Theme Functions (functions.php).

    RandImage asks that the users to “insert this code in your theme”:
    <?php randimage_sidebar(); ?>

    I guessed (wrongly?) that this meant that I should add the code to the Theme Functions (functions.php) code. I did so, in line 2, but it didn’t work. So I tried removing the < and > and fiddled a bit back and forth with this, and now all I get is this error message:

    Parse error: syntax error, unexpected ‘<‘ in /customers/ on line 2

    Unfortunately, I can no longer access the functions.php page to correct the error. I guess I’ll need to upload the unaltered original file to the webserver and try again.

    But – where exactly SHOULD the RandImage code <?php randimage_sidebar(); ?> be placed? Did I choose the wrong file to put it in? Or did I choose the right file but add the code at the wrong place?

  • The topic ‘Theme Functions (functions.php) code messup’ is closed to new replies.