Results 1 to 2 of 2

Thread: the query it no longer recognizes the category events

  1. #1
    surferbloggy is offline Hello World
    Join Date
    May 2010
    Posts
    45

    Default the query it no longer recognizes the category events

    Hi I made a code for wordpress that show the events posts with the opacity if the event is is past
    it worked but after a many weeks mayby becouse of the wp upgrade it doen't work anymore
    I've made many tests and the problem is the query
    it no longer recognizes the category events

    this is the query
    <?php query_posts( 'category_name=events&posts_per_page=6&orderby=dat e' ); ?>

    even if I delete all the script i can't see the events posts
    neither this way:

    query_posts('cat=32');

    the id is 32 but it doesn't work instead if I make this:

    global $paged;
    query_posts('cat=-24,-32,-33&paged='.$paged);?>

    it doesn't show the 32 category
    i can't show in this page the 32 categories post i tried also with:


    $query = new WP_Query( array( 'tag__in' => array( 32, 33 ) ) );
    and many others but nothing

    what's wrong??could you help me?? thank you

  2. #2
    PressedIn's Avatar
    PressedIn is offline Hello World
    Join Date
    Sep 2011
    Location
    Jonhnson City, TN
    Posts
    28

    Default

    Try using the following

    Code:
    query_posts($query_string . '&cat=YOURCAT');
    This is working on the latest stable release of WordPress (not the latest beta, not tested with those versions yet). Simply replace YOURCAT with the category ID.
    Jonathan T. - PressedIn
    Managed WordPress Hosting, for Free
    .
    twitter: @pressedin - gtalk & email: hello [at] pressed.in

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •