Step one:
Go to genesis settings and make the display of content archives “Entry excerpts” as follows
Step Two:
Copy the code below and paste it to functions.php of genesis child theme
//READ MORE BUTTON /* 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'); /* User defined excerpt length. * @param type $length * @return int */ function custom_excerpt_length($length) { return 65; } add_filter('excerpt_length', 'custom_excerpt_length');
Leave a Reply