• I have a custom query on my main index page – I’m having 2 problems with this query that I hope someone can help me work around

    1) how do I make this ignore any private posts?
    2) my 'tag' => 'paid' argument is not working?

    thanks,
    Mike

    $args=array(
        'cat' => 4,
        'tag' => 'paid',
        'orderby' => 'rand',
        'posts_per_page' => -1,
        'showposts' =>15
    );
    
    query_posts($args);
    
    while(have_posts()) {
        the_post();
Viewing 1 replies (of 1 total)
  • Thread Starter myinstinctwaswrong

    (@myinstinctwaswrong)

    issue #2 appears to be related to a bug/enhancement in WP related to using both a catgeory choice and a tag choice – I have worked around that in this case by removing the 'cat' => 4, argument.

    Would still like to know how (if possible) to exclude private posts by adding to the above set of $args.

    thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘how to ? query_posts for specific tag and ignore private’ is closed to new replies.