This code enables you to connect the read more link to any internal or external URL. Please follow the steps mentioned below to add this feature to your website.

Change Read More Link To Target Any URL

The code in this tutorial comprises illustrations that enable you to:

  • Link the read more link into some category archive page.
  • Link the read more link to an absolute URL example: http://techmuzz.com
  • Link the read more link for any permalink using the post or page I.D.
  • Link the read more link to either excerpts or articles limit place in
    • Genesis > Theme Settings > Content Archives > Screen: Entry excerpts / articles.

The code allows you to create the link and change the link text conditionally or for all links.

In addition to this, the code enables you to link a little read link assigned to at least one or more classifications to the default post permalink.

This code assumes you have put Genesis > Theme Settings > Content Archives > Display to Entrance excerpts and links all articles assigned to the category named home into the category archive with an i.d of 1 otherwise links to the default single post permalink.

If You’re using the Genesis > Theme Settings > Content Archives > Display Entrance content, swap the 1st line of this code with this:

add_filter( ‘get_the_content_more_link’, ‘filter_read_more_link’ );

Paste below code into your functions.php file:

To link to a post or page permalink working with the post or page i.d, swap out the variable with the next.

$permalink_url = esc_url( get_permalink(‘1’) );

To link to an absolute URL (but don’t forget to change the URL though), swap out the variable with the following:

$url = esc_url(‘http://techmuzz.com’);

Please, let us know if you face any problems while performing the above steps in the comment section below. We will be glad to help you.