title: Insert a Variable within a WP_Query (Wordpress)
body: <p>I am trying to get wordpress to pull an ID from a variable to use within a category query but for some reason it isn't working. It's probably something with the syntax could you just give me a helping hand.</p>
  
  <p>Here is what I have...</p>
  
  <pre><code>$catPosts1 = new WP_Query('category=$cat1&amp;offset=5&amp;posts_per_page=3');
  </code></pre>
  
  <p>Basically what I want it to do is get the category ID from $cat1 (I have tested and it is entering a category id in the variable), offset the number of posts by 5 and display 3 posts linked with that category. At the moment the code is just displaying posts offset by 5.</p>
  
  <p>Any ideas?</p>
  
  <p>Mark</p>