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 |
You could try Sticky Front Page Categories and Tags
|
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.
|
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 |
Actually, I think I have it figured out. Thanks again everyone for your help!
|
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?
|
They were asking for a single story on the home page. I did figure it out though. Thank you!!!
|
Would you mind sharing your "fix"?
|
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. |
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:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.