Forums

how to ? query_posts for specific tag and ignore private (2 posts)

  1. myinstinctwaswrong
    Member
    Posted 2 years ago #

    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();
  2. myinstinctwaswrong
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.