Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Append ellipses to excerpts and then show "Read More" button for manual & automatic excerpts.
- * @param type $text
- * @return string
- */
- function custom_excerpt($text) {
- // $text= substr_replace($text,"...",strpos($text, "</p>"),0);
- $excerpt = $text . '<a href="' . get_permalink() . '"><button class="read-more-btn" type="button" value="read_more">Read More</button></a>';
- return $excerpt;
- }
- add_filter('the_excerpt', 'custom_excerpt');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement