Adding ellipsis to end of content on Portfolio page

Homepage Community Forums Epik Theme Support Adding ellipsis to end of content on Portfolio page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10743
    h2meyer
    Customer

      Hello,

      I would like to have the ellipsis added to the end of the content on the Portfolio page, as with other excerpts. Can you point me to the code that is stripping that out? I tried using css to insert the ellipsis, but because the “Read More” is within the <p> tags, it didn’t work.

      Thanks!

      #10745
      Wes
      Moderator

        Look for something like this in your page_portfolio.php template file (inside your theme folder) –

        // Custom Read More link
        add_filter( 'excerpt_more', 'portfolio_read_more_link' );
        add_filter( 'get_the_content_more_link', 'portfolio_read_more_link' );
        add_filter( 'the_content_more_link', 'portfolio_read_more_link' );
        	function portfolio_read_more_link() {
        		return '<a class="more-link" href="' . get_permalink() . '" rel="nofollow">Read More</a>';
        }

        That code adds the Read More button (which is usually how I think it’s done in Genesis). You could add it in right before the hyperlink code starts…..like this –

        // Custom Read More link
        add_filter( 'excerpt_more', 'portfolio_read_more_link' );
        add_filter( 'get_the_content_more_link', 'portfolio_read_more_link' );
        add_filter( 'the_content_more_link', 'portfolio_read_more_link' );
        	function portfolio_read_more_link() {
        		return '...<a class="more-link" href="' . get_permalink() . '" rel="nofollow">Read More</a>';
        }

        and that would have it show up at the end of the text.

        #10766
        h2meyer
        Customer

          Perfect, Thank you Wes!

          #10772
          Wes
          Moderator

            You’re Welcome!

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The topic ‘Adding ellipsis to end of content on Portfolio page’ is closed to new replies.