Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

Change [...] at the end of excerpts to hyperlinks?

  1. I apologize in advance if this has already been addressed somewhere. I looked through the forum but didn't find anything . . .

    I've created a site using Hybrid News. The audience this site targets does not always understand to click the title of an excerpt to view the full post.

    Is it possible for the [...] at the end of each excerpt to be replaced by something like [Full Story] or [Read More], as a hyperlink to the full post?

    If so, please tell me exactly how to do this, and provide any code changes, if possible. I'm not a programmer but I can follow clear instructions.

    Thank you!

    Terry

  2. This works for me. Just drop it into functions.php

    add_filter( 'the_excerpt', 'my_excerpts' );
    
    function my_excerpts($content) {
    	global $post;
    	$more = '<a class="more-link" href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '">[...]</a>';
    	$content = str_replace('[...]', $more, $content);
    	return $content;
    }
  3. Thank you so much! It worked perfectly and is exactly the solution I was looking for.

    Terry

  4. You must have been reading my mind. This is exactly what I was looking for. Thanks.
    Sharmil McKee

  5. It did work, sort of.

    The "read more" is placed at the beginning of the last sentence, rather than at the end where the (...) were originally located.

    Did I do something incorrectly, or is there another way of doing this so that the "read more" shows at the end of the last sentence, hopefully with a couple or three spaces allowing for a balanced look. Thanks

  6. what is the link to where it is happening on your site kalueke?

  7. Sorry. I removed the code, but I'll reinstate it so you can see what it looks like. The link to my site is:

    http://www.thepubliceditor.com/blog1/index.php

  8. When I inspect element with firebug you have float left on your more link in your css styling.

    If I try float right it goes on the right side

  9. Thanks much. That did the trick. I appreciate your swift response.

  10. Sweet...I seldom get it right but I like trying to help. I'm sure Justin sometimes thinks oh no there goes slipn trying to help again...

  11. You must be a logged-in exclusive member to view this reply.

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Core Framework (54 posts)
  • Hybrid Theme (22,711 posts)
  • Bliss Theme (255 posts)
  • Options Theme (10,362 posts)
  • Visionary Theme (767 posts)
  • WordPress (144 posts)
  • WordPress Plugins (2,146 posts)
  • bbPress Themes (308 posts)
  • General Discussion (5,572 posts)
  • Critical Theme (0 posts)
  • Hybrid News Theme (132 posts)
  • Hybrid Original Theme (26 posts)
  • Leviathan Theme (16 posts)
  • Life Collage Theme (9 posts)
  • Old School Theme (3 posts)
  • Outline Theme (108 posts)
  • Skeleton Theme (40 posts)
  • Structure Theme (2,768 posts)
  • Members Plugin (2 posts)
  • Cleaner Gallery Plugin (14 posts)
  • Get the Image Plugin (3 posts)
  • Message Board Plugin (0 posts)
  • Widgets Reloaded Plugin (0 posts)
  • Breadcrumb Trail Plugin (0 posts)
  • Query Posts Plugin (80 posts)
  • Hybrid Hook Plugin (7 posts)
  • Hybrid Hook Widgets Plugin (0 posts)
  • Hybrid Tabs (5 posts)