dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
1
share rss forum feed


ProtusMose
Immortal. Eternal.
Premium
join:2001-10-03
Bellevue, NE
kudos:4
Reviews:
·ooma
reply to stray

Re: Wordpress - filter out authors from main feed

Thanks! That works for the main blog landing page. I've got it set to
$my_query = new WP_Query( 'author=-20' );

I'm struggling now to figure out how to add that argument to the other sections that pull feeds. For example, the front page of the site pulls the last three posts and displays at the bottom of the page.

<h2><?php the_title(); ?></h2>
 
<!-- // bodycopy \\ -->
<div class="bodycopy">
<div class="columnone">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(__('(more...)')); ?>
<?php endwhile; else: ?>
<?php endif; ?>
</div>
 

If I could get that section to filter out also, it would be enough for me to move forward in a project and figure out how to strip it from the archives at a later date.

--
Blogsaus "Everyone bows to something. Everyone answers to someone. Wherever your treasure lies, there your heart will be also.

Who do you belong to? " - Andrew Schwab


stray

join:2000-01-16
Warren, NJ
Same line added just before:

<?php query_posts($query_string . '&author=-20'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 

will do the trick. The idea is to setup any special conditions on your posts database query before you head into the loop: while (have_posts) ....

--
V-Rtifacts - When Virtual Reality Was More Than Virtual


ProtusMose
Immortal. Eternal.
Premium
join:2001-10-03
Bellevue, NE
kudos:4
That's not working right now. I'll have to play with it more tonight outside of business hours. :\