• Resolved ChrisColston

    (@chriscolston)


    I’m having real difficulty displaying summarys for posts on the front page (blog roll).
    I’ve tried adding the following to functions.php

    function excerpt_read_more_link($output) {
     global $post;
     return $output . '<a href="'. get_permalink($post->ID) . '"> Read More...</a>';
    }
    add_filter('the_excerpt', 'excerpt_read_more_link');

    but to no avail.

Viewing 8 replies - 31 through 38 (of 38 total)
  • I’ll give that a go, thanks.
    Although I have Dreamweaver, I tend to only use it to see line numbers.
    I can’t enlarge the text, can’t zoom in, can’t colour it, and I find it a strain on the eyes trying to read it. Whereas TextEdit gives me all those functions. I will just have to keep an unedited copy that I can open in Dreamweaver when I need to, and use this one to make the final changes and upload.

    I just used your code from the pastebin (the second one, as the first one looked like mine), and got:

    Parse error: syntax error, unexpected T_FUNCTION in /home/diann/public_html/wp-content/themes/twentytwelve-child/functions.php on line 8

    Gee…..

    YES! I took your suggestion, and made a new Dreamweaver file with the same code in it, uploaded that, and bingo! I got my 100-word excerpt length.
    Alchymyth, big thanks for sticking with me and guiding me on this journey!

    I spoke too soon…. some weird characters have appeared in my widget…. got to do a full checkup now….

    What it seems to have done is taken away the website title from being displayed on the browser tab…. which is a pest….Can’t imagine why a change to excerpt length on functions.php should mess with the browser tab title!

    Found it. Dreamweaver had added a bunch of html crap after the closing tag about the title being called Untitled. So I deleted that, and now it looks good.

    My way:
    1. Add new functions to functions.php file:

    function new_excerpt_length($length) {
    	return 55;
    }
    add_filter('excerpt_length', 'new_excerpt_length');
    
    function new_excerpt_more($post) {
    	return ' <a>ID) . '">'
    	. 'Read more...' . '</a>'; }
    add_filter('excerpt_more', 'new_excerpt_more');

    2. change content.php
    is_search() -> !is_single()
    before
    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
    after
    <?php if ( !is_single() ) : // Only display Excerpts for Search ?>

    @alchymyth
    Thank you so much for your is_home solution! This has allowed me to have excerpts on the front page but leave the RSS feed full content.

    I searched for a solution to this in order to get a full article to display in a MailChimp email—just tested it and it works perfectly in that setting! Which I am mentioning here in case anyone else is struggling with that specifically—may it help them as well!
    Cheers all!
    Ellen ??

Viewing 8 replies - 31 through 38 (of 38 total)
  • The topic ‘Twenty Twelve not displaying summary or manual posts excerpts’ is closed to new replies.