• Hi, I’ve read through a bunch of the docs & forum posting, and a few other sites as well, but haven’t seen a way to do what I need.

    I would like to place at the top of the page, the last 5 posts of a specific category. If this is covered somewhere and I’ve just missed it, could you please point me in the right direction?

    I’ve read through Adding a mini loop, Playing with WordPress, Conditional Tags, and tried variations of them, but no luck.

    TIA!
    Shari

Viewing 6 replies - 1 through 6 (of 6 total)
  • I want to do the same, a static small heading, explaining the site, and then dynamic, the latest posts. Im trying to get more info from http://www.transycan.net/blogtest/2007/09/10/static-frontpage-combined-with-dynamic-content/ but its down, so im resorting to http://209.85.135.104/search?q=cache:F1zkPtn-rygJ:www.transycan.net/blogtest/2007/09/10/static-frontpage-combined-with-dynamic-content/&hl=en&strip=1 but i cant ask anything there, but maybe you find already smt there.

    I myself am mostly wondering with template is being used for the front page, and how that templates interacts with the admin panels read first apge-section.

    This might be of some use to you guys:

    <?php
    query_posts('cat=1,3,4,19,12,18,11,17,5,14,20,13,15,16,2&showposts=3');
    ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="postnew"><h2 id="post-<?php the_ID(); ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p class="cat">
    <?php the_time('M d, Y') ?> by <?php the_author() ?> in <?php the_category(', ') ?></p>
    <div class="entry"><?php the_content('Continue reading...'); ?></div>
    <p class="postmetadata"><?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p></div><br />
    <?php endwhile; ?>

    If you only want a specific category to show, find out what the id of that category is by going to Manage –> Categories in your admin panel. Then go to the query_posts section of the code above and put the category(ies) you want after the “cat=” bit. However many posts you want to actually show, just indicate that number by the showposts bit. All the other code, is just there for links, indicating who the author is, dates & times, edit options if you’re able to edit, what to indicate if there are 0, 1, or multiple comments, etc. Use this if you have to.

    I hope this helps and you will need to place this in the home.php file

    I hope this helps and you will need to place this in the home.php file
    If we are talking about WP 2.3.2 and the new feature of assigning a Page as your frontpage and another one as your posts page… then you are completely WRONG!
    Do not use any home.php – the home.php file solution is about 5 versions earlier.

    Oh, ok…well I guess this is why I said –> I hope this helps you…At any rate, can you provide the solution or a solution?

    Edit: If that above does not help you or apply, common sense dictates that you shouldn’t use it.

    Okay, after reviewing some things you definitely should be careful of my “advice” on this issue. Moshu is most likely correct (he’s writing a book on this whole wordpress thing after all)…Not the kindest person but if he’s ever actually not too irritated to answer the problem, go ahead and take the advice. Hope you find a solution!!!

    Okay, I got it working now; i was confused between templates, pages and… well just confused…

    The only problem now is that

    <?php the_content('Read more...'); ?> doesn’t abbreviate my posts, and <?php the_excerpt(); ?> only shows the first 55 words, without paying attention to the more tage. How come?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Static Front Page w/Dynamic Content at the top’ is closed to new replies.