Support » Fixing WordPress » Custom Field Query

  • Resolved Smrth

    (@smrth)


    Is there other way around?
    query_posts(‘meta_key=letter&meta_value=D’); just wont do.. wont display the results as there aren’t any meta value. When i tried it on my other blogs it worked perfectly..
    Does any1 know any other way to do this?
    sry for my bad english 😛

Viewing 4 replies - 16 through 19 (of 19 total)
  • xdesi

    (@xdesi)

    What does:

    <?php
    if($_GET['letter']){
    $letter = $_GET['letter'];
    $posts = query_posts("meta_key=letter&meta_value=$letter");
    echo "<h1>Letter query<h1>";
    }
    else{
    $posts = query_posts($query_string . '&orderby=title&order=asc' . '&showposts=10');
    echo "<h1>normal query<h1>";
    }
    //Do stuff with $posts here
    ?>

    display?

    Smrth

    (@smrth)

    is $letter is set, it displays nothing, if is not set display usual thing, posts in that category (as it should work)..

    Smrth

    (@smrth)

    i give up on this.. its not worthy xD

    edit: i wanted to check once more and disabled all plugins and activate one by one.. at the end plugin called Advanced Category Excluder was making problems..

    sry that i wasted your time and thanks for all help!

    xdesi

    (@xdesi)

    oops 😀

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Custom Field Query’ is closed to new replies.