Support » Fixing WordPress » new wp_query(parameters not passed)

  • hi everyone
    im working on customizing wordpress 1.5.2

    i have a few queries to make on the homepage where i basically request a list of 5 recent posts put together by category. Now when i write the query i request the category and the length of the list by passing
    $my_query = new WP_Query(‘category_id=21&showposts=5’);

    but the system always returns the latest 5 from any given category…not the category i want…21 in this example.

    url is
    check it out

    thx for any help

Viewing 3 replies - 1 through 3 (of 3 total)
  • I believe
    $my_query = new WP_Query(‘category_id=21&showposts=5’);

    should be
    $my_query = new WP_Query(‘cat=21&showposts=5’);

    At least it worked for me.

    Do you happen to have difficulties making these second queries with IE or Opera? I have and they work just fine with Firefox. Hopefully it’s again something really stupid reason I’m embarrassed to admit.

    It is quite useless to “reply” to a post more than one year old… Look at the date!

    I have to admit I didn’t notice the date. But, someone might still end up on the post with the search and would like to have an answer. I found it with search trying to find an answer for my problem. Not helping me, but maybe someone else.

    Why should there be a limit how old a thread to reply to? Unless, there really is a rule of it. In which case I apologize.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘new wp_query(parameters not passed)’ is closed to new replies.