• P

    (@paulsanduleac)


    I need to create a dropdown list with tags in the header of the theme. Please help.

    The tutorial from WPHacks is giving me a blank page error.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The content on the left side changes when selecting from the dropdown..

    Is each column pulling it’s data from the same query or are they seperate queries?

    Thread Starter P

    (@paulsanduleac)

    When I try clicking, the content does not change at all, only the page refreshes. Try again and you will see.
    Each box is a separate query, so that I have about 7 queries on the page.

    Can i see the code that handles outputing those posts, the category queries.

    Thread Starter P

    (@paulsanduleac)

    Could this be because of the large number of queries on the page?

    Thread Starter P

    (@paulsanduleac)

    Here is the code that I use for all of them, each one separately, only the category name changes: http://pastebin.com/Bfs9YNaH

    There’s nothing in those queries to accept the incoming tag queries..

    Perhaps something along these lines will help get you started,

    // New code
    $queried_tag = get_query_var( 'tag' ) ? get_query_var( 'tag' ) : '';
    $queried_tag = ( $queried_tag = '' ) ? '&tag='. $queried_tag : '' ;
    // Your code
    $lastposts = get_posts("numberposts=1&category_name=news$queried_tag");
    foreach($lastposts as $post) :
    
    .... etc (trimmed for example)

    Else your queries do nothing to with the queried for tag..

Viewing 6 replies - 16 through 21 (of 21 total)

The topic ‘Tag Dropdown’ is closed to new replies.