Adding a PHP Code Snippet not working > Parse Error
-
Hi Guys,
I am having the worst time adding a simple php code snippet to my page… I have the [php] enabled in the settings and this is my code I am trying to insert into a page:<br /> <?php<br /> $args = array(<br /> 'post_type' => 'review',<br /> 'post_status' => 'publish',<br /> 'posts_per_page' => -1,<br /> );</p> <p>$all_reviews_query = new WP_Query($args);</p> <p>if ($all_reviews_query->have_posts()) {<br /> while ($all_reviews_query->have_posts()) {<br /> $all_reviews_query->the_post();<br /> global $post;<br /> if ($post->post_type=='accommodation') {<br /> $likes = get_post_meta($post->ID, 'review_likes', true);<br /> $author = get_the_author();<br /> ?><br /> <!--testimonials--><br /> <article class="testimonials clearfix"></p> <blockquote><p><?php echo $likes; ?></p></blockquote> <p> <span class="name"><?php echo $author; ?></span><br /> </article><br /> <!--//testimonials--><br /> <?php }<br /> }<br /> }<br /> ?><br /> ?><br />
————————————————
The result is a Parse Error:Parse error: syntax error, unexpected '>' in /xxxxxxxx/public_html/dev/wp-content/plugins/thesis-openhook/inc/shortcodes.php(28) : eval()'d code on line 2
But I don’t know what that means or how to fix it…. a little help please.
This is the page: https://dev.bigbearcabinsandrentals.com/reviews/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding a PHP Code Snippet not working > Parse Error’ is closed to new replies.