Support » Everything else WordPress » Need some help with query_posts

  • Hi,

    I made some plugin that i can search for the first letter and also in a category or not.

    this works great, its like a form with all A-Z buttons and a dropdown list for the cats.

    like i said this works great, but when i am getting the search displayed (the plugin uses the index.php for displaying those results)
    and when i click on it to go to the single post display.
    i use the page navigation in the single posts, i loose mine query and the posts are ordered like on the frontpage (not the layout)

    so when i search for “battle” in the cat “Action” i get like 17 results shown, i like to see those results back in mine single pages and not all of mine posts.

    so i guess single breaks the query and shows them all

    dunno how to solve it?

    i use this on mine index.php
    but this worls only for the multiple posts display. need some guidance how to do it in a single post view so i can navigate from the single view thru mine results.

    /* Letter Index  */
            if (isset($_GET['category_parent'])) {
                $addcatid = $_GET['category_parent'];
                                                  } else {
                                                  $addcatnaam = single_cat_title('', false);
                                                  $addcatid = get_cat_id($addcatnaam);
    if (isset($_GET['letter'])) {
    $letter = $_GET['letter'];
    add_filter('posts_where', "custom_post_where");
    $posts = query_posts($query_string . '&cat='.$addcatid.'&orderby=title&order=asc&posts_per_page=13');

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Need some help with query_posts’ is closed to new replies.