Support » Plugins » limiting the_content, more link

  • How do i add a “read more” link where the … are ?

    add_filter('the_content', 'content_intercept');
    function content_intercept($content) {
    //how many characters to show from each post
    $maxchars = "200";
    $newcontent = ''.substr($content, 0, $maxchars).'...';
    return $newcontent;
Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m not quite sure what you are trying to acheive. Could you explain in more detail what you want this filter to do.

    A read more link can be added using the following code

    global $id;
    $more_link_text='read more>>';
    $newcontent .= ' <a href="'. get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>";

    • i want something to filter the_content so that i only display 100 words.
    • images and links dont break, and is viewed. so excerpt dont work for me…i use vipers videotags and want videoes to be displayed
    • i need a “read more link”
    • now some image links breaks off in the middle of the link and that breaks the design.

    can anyone help me with this. i couldnt find any plugin that did this. i searched a lot.


    How about using the custom excerpt plugin

    In what php file do you add the global more? post-template?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘limiting the_content, more link’ is closed to new replies.