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.
Here is what I have...
$catPosts1 = new WP_Query('category=$cat1&offset=5&posts_per_page=3');
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.
Any ideas?
Mark