• I have recently switched to excerpt displays and I love it. But I would like for it to only be in the category and archive list view. I would like for my index to be the full post of my latest post. Is there anyway to accomplish this?

    -Eric

Viewing 7 replies - 1 through 7 (of 7 total)
  • This plugin’s perfect:

    https://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/

    I couldn’t live with out it, although I use it for lists of links. Your way’s a great idea for a site design, too, though.

    Oh do you want #1 full post, and the rest, excerpts? That’s a bit trickier…

    You’d use the plugin twice, with an offset for the rest, set it to the number you’d normally have then, minus one, like 9.

    That’s the easiest way.

    Still you have to style it to look like regular post excerpts, but I think it CAN be done. Otherwise you have to get into more complicated Query Posts.

    https://codex.www.ads-software.com/User:JamesVL/query_posts

    Another feature I can’t live without.

    Thread Starter ericbays

    (@ericbays)

    This is not working out for what I need. And if it can then I have no idea how.

    Make sure you have in your theme folder the following files:
    index.php
    archive.php
    single.php
    Have the_content in your index and single, and the_excerpt in your archive.php. This is the first step.
    Then use a plugin like CQS (custom query string) to set the number of posts displayed in different views: 1 post on home=index, XY on the rest.
    Done.

    Oh the reason it doesn’t work is compatibility with the new ver. THIS WORKS:

    For the first post…

    <?php
     global $post;
     $myposts = get_posts('numberposts=1&offset=0');
     foreach($myposts as $post) :
     setup_postdata($post);
     ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    	<h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<?php if ( is_single() ) { ?><div class="meta"><?php the_author() ?> | <?php the_category(',') ?> | <?php the_time('l, d F Y') ?> <?php edit_post_link(__('Edit')); ?></div><? } ?>	
    
    	<div class="storycontent">
    		<?php the_content(); ?>
    	</div>
    </div>
     <?php endforeach; ?>

    For the 2nd post on…

    <?php
     global $post;
     $myposts = get_posts('numberposts=9&offset=1');
     foreach($myposts as $post) :
     setup_postdata($post);
     ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    	<h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<?php if ( is_single() ) { ?><div class="meta"><?php the_author() ?> | <?php the_category(',') ?> | <?php the_time('l, d F Y') ?> <?php edit_post_link(__('Edit')); ?></div><? } ?>	
    
    	<div class="storycontent">
    		<?php the_excerpt(); ?>
    	</div>
    </div>
     <?php endforeach; ?>

    That plugin DOES work, but not always (anymore).

    At least this works on pages. I keep forgetting what it is you want, with the excerpts, because your title is misleading. Hope this works.

    This is great, adapting it to be just a link to the most recent post, does anyone know how to specify only one category?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Latest Post on home page’ is closed to new replies.