Syntax error, unexpected T_DOUBLE_ARROW in wordpress custom post template
<p>I'm having some problems with the following code: </p>

<pre><code>&lt;?php 
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query-&gt;query('post_type' =&gt; 'news','posts_per_page='.$gogo_blog_text_no_posts.'&amp;paged='.$paged); 
while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); 
?&gt;
</code></pre>

<p>I get *'syntax error, unexpected T_DOUBLE_ARROW'*</p>

<p>I've used similar code before without problems so I'm a touch mystified.</p>

<p>For clarity the remainder of the template looks like this:-</p>

<pre><code>&lt;?php
/*
Template Name: In The News page
*/
?&gt;
&lt;?php get_header(); ?&gt;

&lt;?php 
$gogo_blog_text_headline = get_post_meta($post-&gt;ID, 'gogo_blog_text_headline', true);
$gogo_select_blog_sidebar_position = get_post_meta($post-&gt;ID, 'gogo_select_blog_sidebar_position', true);
$gogo_blog_link_text = get_post_meta($post-&gt;ID, 'gogo_blog_link_text', true);
$gogo_blog_link_url = get_post_meta($post-&gt;ID, 'gogo_blog_link_url', true);
$gogo_blog_text_no_posts = get_post_meta($post-&gt;ID, 'gogo_blog_text_no_posts', true);
?&gt;

&lt;?php if($gogo_blog_text_headline) { ?&gt;
&lt;!--  Begin Motto --&gt;
&lt;div class="motto-meta"&gt;
    &lt;h1&gt;&lt;?php echo $gogo_blog_text_headline; ?&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;!--  End Motto --&gt;
&lt;?php } ?&gt;

&lt;!--  Begin Page image --&gt;
&lt;?php if (has_post_thumbnail($post-&gt;ID)) { ?&gt;
&lt;?php $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post-&gt;ID), 'large');
echo '&lt;div class="header-image"&gt;&lt;img src="'.get_template_directory_uri().'/lib/includes/timthumb.php?src='.$thumbnail[0].'&amp;amp;w=960&amp;amp;h=250&amp;amp;zc=1&amp;amp;q=100&amp;amp;s=1" alt="'.get_the_title().'" /&gt;&lt;/div&gt;';?&gt;
&lt;?php } ?&gt;
&lt;!--  End Page image --&gt;

&lt;/div&gt;
&lt;!-- End Header --&gt;
&lt;!-- Begin main wrap (it ends in footer.php) --&gt;
&lt;div class="wrap wide"&gt;

&lt;div class="main-content-holder"&gt;

&lt;?php if($gogo_select_blog_sidebar_position=='right-sidebar-blog-template') { ?&gt;
&lt;!--Left content area--&gt;
&lt;div class="left-content left"&gt;
&lt;?php } else { ?&gt;
&lt;div class="left-content right"&gt;
&lt;?php } ?&gt;

&lt;?php 
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query-&gt;query('post_type' =&gt; 'news','posts_per_page='.$gogo_blog_text_no_posts.'&amp;paged='.$paged); 
while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); 
?&gt;


&lt;!--Begin post content--&gt;

&lt;?php
    // The following determines what the post format is and shows the correct file accordingly
    $format = get_post_format();
    get_template_part( '/lib/includes/post-formats/'.$format );

    if($format == '')
    get_template_part( '/lib/includes/post-formats/standard' );
?&gt;

&lt;!--End post content--&gt;

&lt;?php endwhile; ?&gt;
&lt;!--End left content--&gt;

&lt;!--Pagination --&gt;
&lt;!--&lt;?php posts_nav_link(' &amp;#183; ', 'previous page', 'next page'); ?&gt;--&gt;
&lt;?php if (function_exists("pagination")) {pagination($additional_loop-&gt;max_num_pages);} ?&gt;
&lt;!--End pagination --&gt;
&lt;?php $wp_query = null; $wp_query = $temp;?&gt;
&lt;/div&gt;
&lt;!--End left content area--&gt;

&lt;?php if($gogo_select_blog_sidebar_position=='right-sidebar-blog-template') { ?&gt;
&lt;!-- Right content --&gt;
&lt;div class="right-content right"&gt;
&lt;?php } else { ?&gt;
&lt;div class="right-content left"&gt;
&lt;?php } ?&gt;
&lt;?php get_sidebar('blog'); ?&gt;
&lt;/div&gt;
&lt;!-- End Right content --&gt;

&lt;/div&gt;
&lt;?php get_footer();?&gt;
</code></pre>
