Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Post appearing in sidebar widget but not front page (http://forum.bytesforall.com/showthread.php?t=3893)

paulae Oct 15, 2009 05:43 AM

Post appearing in sidebar widget but not front page
 
http://www.larchmontgazette.com
ATA 3.4.3 WP 2.8.4

This just started happening. Notice the Pine Brook Residents Call for Safety Study headline at the top of the left sidebar under Recent Articles. Now look under the Featured Content Gallery in the center column. The story doesn't show up there, but it does if you click on the News category link in the cat menu. What could cause this?

To experiment, I edited the post, which was created on Oct. 8, to give it a newer publish date. That didn't do a thing.

We'll be publishing a new edition tonight (Thurs. Oct. 15), so these placements may not survive that, but just thought I'd ask if you see something obviously going on.

juggledad Oct 15, 2009 06:40 AM

What widget are you using? It's not the standard 'Recent Posts' one is it?

paulae Oct 15, 2009 06:53 AM

Actually, it's a piece of custom PHP code:
Code:

<div class="widget widget_recent_posts">
<div class="widget-title"><h3>Recent Articles</h3>
</div>
<div class="widget-content"><ul>
<?php
    $recentPosts = new WP_Query();
    $recentPosts->query('showposts=20');
?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
<?php if (in_category(array('15','80'))) continue; ?>
    <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
</div>
</div>

Flynn helped me with this because I wanted to display recent headlines in the sidebar but exclude recent obituaries and letters to the editor (cats 15 and 80) from the list. He gave me similar code to exclude those cats from the center column of the front page, in index.php:
Code:

<?php /* If there are any posts: */

// Added by Flynn, BFA, April 21 - 2009: Excluding categories 15 and 80 from being displayed an Homepage
if (is_front_page() AND !is_paged()) {
    // $posts = query_posts($query_string . '&cat=-15,-80');
        $posts = query_posts(array('category__not_in' => array(15,80), 'showposts' => 19));
}

I use Enhanced Recent Posts plugin to create the chunks of recent headlines below the main one, for obits and letters, in the left sidebar.

paulae Oct 15, 2009 07:15 AM

OK, I tried something. My partner had made the post sticky, but it wasn't making it show up in the center column, front page. I unstuck it, and now it's there. Go figure!

juggledad Oct 15, 2009 08:00 AM

Make sure to follow up this with Flynn when he gets back, I'm confused why he used query(..) in the sidebar code and not query_posts(...) as he did in the second part

as for it not showing as a sticky......???


All times are GMT -6. The time now is 07:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.