Skip to main content

How to reduce post exerpt and add read more link ?


[Splash] How to reduce post exerpt ?


How to reduce post exerpt on homepage ? And how to add read more link in homepage in post exerpts ?
0
Posted
Hello,
To remove the ellipsis, kindly do the following:
1. Create a child theme of the Splash theme.
2. Inside the child theme's directory, create a functions.php file and paste the following 
<?php

function mts_excerpt( $limit = 40 ) {
  return esc_html( mts_truncate( get_the_excerpt(), $limit, 'words', '' ) );
}
Thank you
Posted
 
Open the file /functions/theme-actions.php and locate this code:
            <div class="front-view-content">
                <?php echo mts_excerpt(48); ?>

Reduce the number of words by changing the number 48 in that code.
To have a read more link below it, then add this code below that code shown above:
<a href="<?php get_the_permalink(); ?>" class="readMore">Read more</a>
Looking forward to help you. Thank you.
0
Posted
Hi, Thank you, but my problem is partially solved. here's a screenshot how i want it.
todder-min.jpg
0
Posted
Fixed it almost with this code <a href="<?php the_permalink() ;?>">&nbsp;Read More →</a>
but how to remove these three dots ?
tod-review-read-more-issue-min.jpg
0
Posted
Hello,
To remove the ellipsis, kindly do the following:
1. Create a child theme of the Splash theme.
2. Inside the child theme's directory, create a functions.php file and paste the following 
<?php

function mts_excerpt( $limit = 40 ) {
  return esc_html( mts_truncate( get_the_excerpt(), $limit, 'words', '' ) );
}
Thank you
0
Posted
Thank you very much, it worked :)
1
Posted
Hello,
It was a pleasure helping you. We are glad you found our help useful. If you have any other questions in future, do let us know. We are here to help you. Could you please leave us a testimonial (if you haven't already done that) on
http://bit.ly/1jNTNkn
about your overall experience with MyThemeShop? This will help us serve you, our members, better. We appreciate your time and patience.
Thank you.
0

Comments