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)
-   -   Single Post on Front Page (http://forum.bytesforall.com/showthread.php?t=4974)

bplazar Dec 22, 2009 09:35 AM

Single Post on Front Page
 
I'm really struggling with putting a single "featured post" on my home page. I've tried making a specific category for the post and tried modifying index.php to use query_posts with a category parameter but for some reason Atahualpa doesn't seem to finish the page when I do that.

I saw in another post a recommendation to use cat2page but that plugin is very out of date and doesn't seem to provide the effect that I need.

Is there a reason why we can't use query_posts with Atahualpa? What other option is suggested for this functionality?

Right now I have the look and feel I want because wordpress is set to only show 1 post - the problem with that is the archive pages only show 1 post as well so this isn't the solution.

Please help!:confused:

coloradoanimalwelfare.org

lmilesw Dec 22, 2009 10:45 AM

You could try Sticky Front Page Categories and Tags

juggledad Dec 22, 2009 11:28 AM

There is a post in the gold forums about ' How to: Create a announcement box at the top of the center column of the landing page' which works by defining a category that will go there and just adding a post to that category and then it is displayed.

bplazar Dec 30, 2009 03:58 PM

I guess I'm out of luck. Sticky Front Page seems to remove almost everything else from my front page and I'm $15 short of getting into the gold forum. I volunteer my time to update this particular website for a dog rescue that is just starting up. Frustrating that query_posts just won't work on this theme.

Thanks for the suggestions.
Beth

bplazar Dec 30, 2009 05:25 PM

Actually, I think I have it figured out. Thanks again everyone for your help!

lmilesw Dec 30, 2009 05:37 PM

Are you looking to only have one article/post on the front page or if a featured post plus others under it is OK you could just use the sticky post function. Do you have an example of what you are trying to accomplish?

bplazar Dec 30, 2009 06:14 PM

They were asking for a single story on the home page. I did figure it out though. Thank you!!!

lmilesw Dec 30, 2009 06:24 PM

Would you mind sharing your "fix"?

bplazar Dec 31, 2009 08:36 AM

I found this code in an old forum post:

<?php if ( is_front_page() ) { ?>
<div class="ec3ctr">
<div class="announce">
<?php $my_query = new WP_Query('category_name=announcements&showposts=1' );
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>
<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>
</div>
<?php endwhile; ?>
</div>
</div>
<?php } ?>

I put it in the Content ABOVE the LOOP and added an announcements category. It seemed to do what I wanted it to do.

lmilesw Dec 31, 2009 10:34 AM

I know you got it figured out but here is a plugin I had forgotten about. Opt-In Front Page. I lets you choose which category of posts will show on the front page and if there are no posts the front page resorts to regular blog function.


All times are GMT -6. The time now is 04:56 AM.

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