• Hello everyone,

    I used following simple code and this works nice:

    <?php
    $args = array(
             'category_name'   => 'Releases',
             'post_type'       => 'release',
             'tag'             => $newstag,
             'meta_key'        => 'release_date',
             'orderby'         => 'meta_value',
             'order'           => 'DESC'
             );
    
    query_posts($args);
    ?>

    Since I updated to WP 3.3.1 this code doesn’t work anymore. ??

    I don’t know why, because $newstag is only a string and comes from the default ‘post_tag’ taxonomy. I also verified the $args-array with print_r() and the correct values are there.

    When I modify the code for testing and enter a static text instead of $newstag, all works fine and the result is correct.

    Can anybody verify this on WP 3.3.1? Or did I overlooked something since the latest releases (I updated from 3.2.1 to 3.3.1)?

    Thanx a lot for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think the problem might be that you are using the category name for category_name. In spite of the label, it requires the slug for the category, probably ‘releases’, not ‘Releases’.

    Thread Starter computerartsde

    (@vnvsven)

    Thank you for your response.

    I tried it first as you wrote, later I delete all other (not so important) parameters in this array for testing. At the end I tried it only with this code:

    <?php
    $args = array(
             'post_type'       => 'release',
             'tag'             => $newstag
             );
    query_posts($args);
    ?>

    Still the same problem. ??
    Any other ideas? Thank you again!

    Thread Starter computerartsde

    (@vnvsven)

    So … I found the error … my $newstag comes with a blank an the end into this array. Puhhh … now all works fine. ??

    Thank you for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘problem with query_posts and $args (since WP3.3.1)’ is closed to new replies.