.

How to Include Read More tag in Genesis Child Theme How to Include Read More tag in Genesis Child Theme

How to Include Read More tag in Genesis Child Theme


  CodingTips[Updated on:Jan-13-2021]    




Usually, the genesis child theme got many options, but, most of the genesis child themes got no option for a read more tag on archives, home feed and categories feed page. A manual code to be included for these cases. The code to be included in functions. php page inside the themes folder.

Normally, you will get the option for functions.php inside themes page. If you can't find that option, simply get into your file manager (Usually the files ) in your hosting. 

Go to Cpanel - > File Manager - > public_html/wp-content/themes/your theme/functions. php

Add the below code at the starting of your functions page:

// Add Read More Link to Excerpts
add_filter('excerpt_more', 'get_read_more_link');
add_filter( 'the_content_more_link', 'get_read_more_link' );
function get_read_more_link() {
   return '[Read More]';
}

You can always edit the Read more code as per your stylings. CSS can be done for the read more or continue reading anchor tags by including buttons, as per your site's theme.


Like & Share

Leave a Comment


Login to post a public Comment

Comments 1.


Mahesh Sharma
2 years ago

For styling the Read More Link, you must use the below code.

add_filter('excerpt_more', 'get_read_more_link');
add_filter( 'the_content_more_link', 'get_read_more_link' );
function get_read_more_link() {
return '<button style="padding:5px;margin:2px"><a style="color:white" href="' . get_permalink() . '">[Read More]</a></button>';
}