• DeirdreBunny

    (@deirdrebunny)


    Hello-

    I am designing a magazine-type theme for a client. The way it is intended to layout is that there will be 2 columns on the homepage with a total of 3 posts: 1st column has 1 post, 2nd column has 2 posts.

    What I would like to achieve is different excerpt lengths, with the most recent post (the one in the left column) having a longer length than the other 2 posts — something like 200 words for the latest and 50 words each for the other 2.

    I was trying out the Homepage Excerpts plugin, which allowed me to choose the excerpt limit, but since I do not want all of the posts to have the same number of words, I chose the option to display 1 full post (the most recent) and have the other 2 posts at a 50 word max, excerpt. I had planned to then just use the ‘read more’ tag on the main post if it happened to be extremely long (the column of the most recent post is rather narrow and I don’t want the page ending up excessively long). The only problem with this plan is that the Homepage Excerpt plugin renders the ‘read more’ tag, useless.

    I’ve spent about 2 hours trying different plugins, and haven’t come across anything that works. I know there has got to be some way to do this, but as to how simple it might be, I do not know — so I am looking for suggestions on how to approach this.

    Two things that may be useful to know: The theme started off as the original classic theme, so it doesn’t have a single or post php, which probably doesn’t matter since we’re discussing the homepage only. Also, because of the different styling of the homepage posts, my index.php loop code is different than the original (note the $class value of ‘posn’). That may not matter but I thought I’d bring it up just in case it affects suggestions:

    <?php
    /**
     * @package WordPress
     * @subpackage Classic_Theme
     */
    get_header();
    
    ?>
    <div id="box"><?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?></div>
    
    <?php $class = 'posn';
    $c = 0;?>
    <?php if (have_posts()) : while (have_posts()) : the_post();
    $c++;
    $class .= $c;
    ?>
    
    <div id="post-<?php the_ID(); ?>" class="post <?php echo $class; ?>">
    
    	 <h3 class="storytitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
    	<div class="meta">By <?php the_author() ?> on <?php the_date(); ?> @ <?php the_time() ?></div>
    
    	<div class="storycontent">
    
    			<?php the_content(__('(more...)')); ?>
    	</div>
    
    	<div class="feedback">
    		<?php wp_link_pages(); ?>
    		<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    	</div>
    
    </div>
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    <div id="comment_rap"><?php comments_template(); // Get wp-comments.php template ?>
    </div>
    
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
  • Thread Starter DeirdreBunny

    (@deirdrebunny)

    Still haven’t had any luck with this. I tried a few more plug-ins, such as ‘Better Excerpt’ which allows you to call a function for specific posts, allowing to change the excerpt length, but I couldn’t figure out how to target it to just one post (the first one) — also, it created double excerpts on my homepage.

    The developer of ‘Homepage Excerpt’ (the current plug-in I’m using) was planning on making it compatible with the ‘More’ tag, but mentioned that in 2007, so I don;t think it will be happening.

    Anyway, just updating and checking in to see if anyone had further suggestions.

    Thanks!

    ~Deirdre

    PS Here is a link to the site if it helps: http://hideoutmagazine.com/

Viewing 1 replies (of 1 total)
  • The topic ‘Homepage Excerpts of different lengths.’ is closed to new replies.