Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I tried to execute the following code and I got a parsing error message (line:3). Here is the code on Pastebin http://pastebin.com/gC7rsJqw.

I tried echoing but didn't seem to solve the problem. Maybe I missed something. What am I doing wrong? Please help.

share|improve this question
add comment

1 Answer

You have to close the PHP context if you use raw HTML output. Instead of …

<?php
global $EM_Event;
<div class="content_left">

    <?php gteventstore_before_loop(); ?>

… close PHP before the div:

<?php
global $EM_Event;
?>
<div class="content_left">

    <?php gteventstore_before_loop(); ?>

Use an IDE with a PHP parser to see such syntax errors early. You code looks in Eclipse PDT like this:

enter image description here

If you tip the red icon you get an explanation:

enter image description here

Read more about Eclipse and WordPress.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.