Support » Fixing WordPress » how do I change the “[…]” after the excerpt?

  • semidivine


    Simple question, I hope… I really can’t stand the way the “[…]” looks after the excerpt, it doesn’t make sense to me, and I really would love to just have “…” show up. I did a WordPress-wide search for it in the code to see where it is, and I found something in wp-includes/formatting.php and changed the occurrence of “[…]” on line 804 (it’s in function wp_trim_excerpt.) I also changed $excerpt_length to 45. I then uploaded the file and nothing on the site has changed. What am I doing wrong? I can’t find it anywhere else.

Viewing 11 replies - 1 through 11 (of 11 total)
  • moshu


    Since I don’t like editing core files… I always use a plugin for handling the excerpt.
    This is my favourite:
    although there are others, too.



    Thanks! I just tried it and it doesn’t work with my jLanguage plug in, so I need to try something else. If I ever mess with core files it’s always to change silly details like this, I never mess with any functionality.

    So I guess I’ll go back to my original question… do you know where that “[…]” resides in the code? I’ll proceed at my own risk.



    you don’t have to edit any core files, you can instead add arguments to the template tag. for example any text, dots, etc:

    <?php the_content('...'); ?>

    or any html-code (<p>…</p> doesn’t validate):

    <?php the_content('<span class="my-excerpt">read more</span>'); ?>

    i don’t like my short answers, but my english isn’t good enough… 😉

    edit: you have to add the “more-tag” manually in your posts to make this work, because now in your template you don’t use “the_excerpt”.



    The more tag is not going to work… the client is going to be updating this site and is not going to know to put a more tag in. I just need the excerpting process to be automatic. So… I need to use the the_excerpt function, using a plugin to create a different ellipses style doesn’t work because I haven’t found one that works with jLanguage (the plugin I use to have two languages on the site) so can someone pleeeeeeease tell me where to change the “[…]” in the code? I would so appreciate it.



    Well, if you have clients that pay you… you should have the necessary tools to find a string in the files.



    that was rude.

    I told you I did a search of the whole of wp (using BBEdit) and couldn’t find the string. it is possible that it’s in the code using html entities, although I searched for that as well and still couldn’t find it. do you actually think I didn’t exhaust all possibilities before calling upon this resource?

    if you know where it is could you please tell me? why on earth do i have to ask three times?



    found it! I am using the plugin EventCalendar3 and there is a function there that hijacks the wp excerpt function. That’s why when I changed the function in formatting.php, nothing happened.

    For anyone who cares, the function is in eventcalendar3.php in the Eventcalendar3 plugin folder, line 535.

    Thanks god that’s over.

    Hi semidivine,

    i have a problem with get_excerpt too. I also use eventcalendar3. What exactly did you change?

    I am not getting the excerpt, that I put into the database. The system is making its own excerpt with the result, the it is not good formatted and longer than intended. 🙁

    This is my code:

    $postlist_1 = get_posts('numberposts=36&category=6');
    $postlist = array_reverse($postlist_1);
        if ($postlist) {
    	foreach ($postlist as $post) {
    				echo '<h2 id="post-', the_ID(), '"><a href="', the_permalink(), '" rel="bookmark" title="Permanent Link to ', the_title(), '">', the_title(), '</a></h2>';
    		echo('<div class="entry">');
    		echo "</div>";

    Thanks in advance!

    I’m not sure what you want to change about it, but EventCalendar3 definitely has the final say in how the excerpt shows up.

    Go to eventcalendar3.php in the Eventcalendar3 plugin folder, line 535. That’s where you can put your own excerpt styling.

    Good luck!

    I changed the […] via wp-includes/formatting.php myself! It worked just fine, I wonder why it didn’t work for you? 🙁 What a shame! It’s so much easier to just edit a line of code than to install an entire plugin, at least in my opinion.

    Oh, and don’t mind moshu — He’s quite rude in all of his ‘support’ posts, and he seems to believe that no one knows more about WordPress than him. Not sure how he became a moderator with that sort of attitude!

    It’s so much easier to just edit a line of code than to install an entire plugin, at least in my opinion.

    … just remember you’ll have to do it after every upgrade …

    (and frankly, the personal attack you slipped in there didn’t really help anything.)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘how do I change the “[…]” after the excerpt?’ is closed to new replies.