Readmore link for excerpts as well as content limit

Homepage Community Forums Ally Theme Support Readmore link for excerpts as well as content limit

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11358
    stinkykong
    Customer

      My Genesis Theme settings are set to display “excerpts” in the archive
      listings. I want “readmore” links to appear on all excerpts.

      I added this to functions.php in attempt to make “read more” links appear:

      function new_excerpt_more($more) {
      global $post;
      return ‘ [Read more…]’;
      }
      add_filter(‘excerpt_more’, ‘new_excerpt_more’);

      However, when I add the excerpt to a post, the readmore link disappears.
      Is there a way to make the readmore link show even when an excerpt is
      added? Perhaps a better script for functions.php?

      URL
      http://tcgihost.com/~rhumc/category/sermons/

      #11370
      Wes
      Moderator

        Unfortunately I haven’t been able to get it working either.

        I’ve tried different types of code/tutorials, but the Read More link still disappears when adding a “More” tag or changing the settings to excerpts.

        #11380
        stinkykong
        Customer

          Wes, do you know a way I could manually add a link inside the excerpt I add that links to its page from the archive, something like <a href="get_page_url">[Read More...]"</a>

          OR

          is there a way to get the content limit to keep from discarding the formatting so that line breaks, links, CSS rules, etc remain in effect?

          #11388
          Wes
          Moderator

            I’ve actually tried both of those suggestions in the past, and couldn’t get it working.

            I’ll send an email to another developer to see if they know what’s going on. It seemed like it worked fine in the past (before Genesis 2.0) so either I’m doing something wrong, or they removed that feature.

            #11759
            sliceofscifi
            Customer

              I believe I originally found this snippet a couple of years ago from a tutorial at Studio Grasshopper, since I was always using manual excerpts and the StudioPress snippets were meant for automatic excerpts:

              add_filter('get_the_excerpt', 'manual_excerpt_more');
              function manual_excerpt_more($excerpt) {
              $excerpt_more = '';
              if( has_excerpt() ) {
              $excerpt_more = ' &nbsp; <a href="'.get_permalink().'" rel="nofollow">[Read more...]</a>';
              }
              return $excerpt . $excerpt_more;
              }<!--formatted-->

              I have this on several sites running Genesis 2.0 and various HTML5 child themes, and since I tend to use manual excerpts 99.9% of the time, I know it’s still working 馃檪 Maybe it can help…

              #11760
              stinkykong
              Customer

                That seems to work fine for me using Ally. I’ll have to make a note of this. Thanks, so much!!

              Viewing 6 posts - 1 through 6 (of 6 total)
              • The topic ‘Readmore link for excerpts as well as content limit’ is closed to new replies.