• Hello there!

    At my theme, the following code is used to – I think – display the most recent 6 (?) posts that are made:

    <div class="foot-info" style="width:29%; float:left; margin-right:8px;">
    					<h2>Most Recent</h2>
    					<ul>
    						<?php get_archives('postbypost', 6); ?>
    					</ul>
    				</div>

    How can I automatically add the first 10 words, or 3 lines of my post to go with those posts?

    Greets!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can’t do that with the template tag, wp_get_archives().

    Need to use a query_posts or get_posts with a loop to do that.

    Or a Recent Posts plugin might do that but not sure which one…

    Thread Starter dekraan

    (@dekraan)

    Do you know how to do this with a query_posts or get_posts thing? I am very poor in php. Pherhaps there is a tutorial somewhere? Every little bit of info is very helpfull!

    Thread Starter dekraan

    (@dekraan)

    Still sounds too difficult to me. At the beginning, my homepage had the following on it:

    <!-- Featured Category 2 -->
    					<?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
    						<div style="padding:5px 0px 5px 0px; text-align:justify;">
    							<div class="home-cats-100" style="padding:1px;"><a href="<?php the_permalink() ?>"><img style="padding:0px; margin:0px; border:0px;" height="100" width="100" src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt=" " /></a></div>
    							<a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>" rel="bookmark"><strong><?php the_title2('', '', true, '55') ?></strong></a>
    							<?php the_content_limit(220, "More &raquo;"); ?>
    						</div>
    					<?php endwhile; ?>

    Is that something similar? I know it showd the entire post, including an image (want that out), but can this be ‘altered’ to show the first 3 posts made in one particular category?

    it could also (there are 4 options) be:

    !-- Featured Category 4 -->
    								<?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
    									<div style="padding:5px 0px 5px 0px;">
    									<div class="home-cats-80" style="padding:1px;"><a href="<?php the_permalink() ?>"><img style="padding:0px; margin:0px; border:0px;" height="80" width="80" src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt=" " /></a></div>
    										<a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>" rel="bookmark"><strong><?php the_title2('', '...', true, '25') ?></strong></a>
    										<?php the_content_limit(50, ""); ?>
    									</div>

    But I am totally weak at understanding this..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘latest posts: short text: how to?’ is closed to new replies.