• Resolved de3r7

    (@de3r7)


    How could I make the preview of my post be longer? πŸ˜›

Viewing 8 replies - 1 through 8 (of 8 total)
  • stvwlf

    (@stvwlf)

    One way to do it is to use the More tag in each post

    A somewhat technical explanation:
    http://codex.wordpress.org/Customizing_the_Read_More

    or a plugin
    http://wordpress.org/extend/plugins/excerpts-deluxe/
    http://wordpress.org/extend/plugins/advanced-excerpt/
    http://wordpress.org/extend/plugins/excerpt-editor/

    You can also modify the code and choose a length longer than 55 words, but the above methods are usually sufficient for most uses

    Thread Starter de3r7

    (@de3r7)

    is because a all ready have a plugin that came whit the template the plugin is called post limit so i know that’s what is limiting my post but if i remove it a get a message on the fist page of my website saying FATAL ERROR so i guest i can’t remove it so really don’t know what to do I tried the more tag trick but it didn’t work for me :S please help!

    stvwlf

    (@stvwlf)

    please post the EXACT error you see on your site when you remove the plugin – just disable it

    Thread Starter de3r7

    (@de3r7)

    Fatal error: Call to undefined function the_content_limit() in /home/de3r7co/public_html/wp-content/themes/Simplism/home.php on line 77

    stvwlf

    (@stvwlf)

    go into your file home.php and around line 77 you should see the_content_limit in the middle of some code. post here about ten lines before and after that line of code.

    Wrap it in code tags – highlight all that and then click the Code button above the editor

    Thread Starter de3r7

    (@de3r7)

    <?php } // end if statement
    
    // if there's not a thumbnail
    
    else { echo ''; } ?>
    
    </div>
    
    			<span class="titles"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title2('', '...', true, '23') ?></a></span>
    			<?php the_content_limit(300, ""); ?>
    <div class="readmore"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">Read More</a></div>
    
    			</div>
    
    </div>
    <?php $ctr++; } ?>
    			<?php comments_template(); ?>
    
    			<?php endwhile; ?>
    <div style="clear: both;"></div>
    stvwlf

    (@stvwlf)

    The problem is that theme assumes the plugin is installed – it calls code in the plugin, so if the plugin is not enabled the theme won’t run.
    This code below gets around that.

    1) If you want to keep access to that plugin available when it is installed, change this line
    <?php the_content_limit(300, ""); ?>
    to this

    <?php if (function_exists('the_content_limit')) {
       the_content_limit(300, "");
    } else {
       the_excerpt();
    } ?>

    if you want to get rid of that plugin altogether
    change this
    <?php the_content_limit(300, ""); ?>
    to this
    <?php the_excerpt(); ?>

    depending on how your theme is set up, you may need to make that code change in more than one template file.
    ===========================
    the_excerpt() will give you the default WP excerpt – 55 words, ellipse at the end, no read-more link

    if you put this code in your theme’s functions.php file it changes the_excerpt’s ellipse to a read more link

    function excerpt_ellipse($text) {
       return str_replace('[...]', ' <a href="'.get_permalink().'">Read more...</a>', $text); }
    add_filter('the_excerpt', 'excerpt_ellipse');

    If you need an excerpt longer than 55 words, I think one or two of those plugins I mentioned earlier allows that.

    Thread Starter de3r7

    (@de3r7)

    thanks a lot πŸ˜€

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Longer post limit’ is closed to new replies.