Support » Theme: Leeway » Change “read more” message

  • hello!

    I’m new here so excuse me in advance if I’m doing it wrong.

    I’d like to change the message on the “read more” button. Does anyone know how to do it? I’ve been struggling with it for a longtime…

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • I did not fully understand what you meant by “… message on Read more button”. However, if you want to change the text “Rad more” to something else, then do the following.

    First of all, make sure you are using a Child theme. Otherwise all your changes will be overwritten when you update your theme.

    Now coming to your requirement:
    There are three places where ‘Read more’ is being outputted from. The files are:

    /wp-content/themes/leeway/content-search.php
    /wp-content/themes/leeway/content-excerpt.php
    /wp-content/themes/leeway/content.php

    Once you have created your child theme copy above files to your theme folder’s root. If you theme folder is named leeway-child (recommended), then copy above files into it.

    Now edit the files you just placed in your child theme (do not edit original theme files), and change the text ‘Read more’ to whatever you like to be there.

    Hope this will work for you.

    Thank you for your answer!

    I had already taken a look at this before but it didn’t word at all. Any other clue?

    thanks

    That’s awkward! I don’t have any other idea of doing this unless you have created some filters and applied it. But I don’t think there is any.

    I downloaded the theme and could changed the text fine by doing exactly what I wrote above.

    Weird, thats what I thought…
    What kind of filters are you talking about? I haven’t created any but we never know.

    So, I found the following filter that allows me to change the text, but it doesn’t replace the button I had before, it adds a new one.

    // Replaces the excerpt "Read More" text by a link
    function new_excerpt_more($more) {
           global $post;
    	return '<a class="more-link" href="'. get_permalink($post->ID) . '"> Read the full article...</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    Got something?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change “read more” message’ is closed to new replies.