• Hello,

    I am trying to include the post title in the “Read More >>” link in the excerpt. I’ve already read a similar topic in the forum, but doesn’t apply to my WP theme (Goodnews).

    I am not a tech guy, but for what I’ve understood, this change need to be done by editing the functions.php file.

    The element looks like this:

    [sourcecode language=""]<a href="https://misite.com/post-URL/">Read more &lt;i class="fa-icon-double-angle-right"&gt;&lt;/i&gt;</a>[/sourcecode]

    What I’d like to have, instead of “Read more >>”, is something like “read more on POST TITLE”.

    Thanks in advance to anyone who will help me with this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,
    Sorry for the trouble. If you’re using a shortcode to display the “Read more>>” text then you could simply modify the shortcode. So it will be look something like this:

    [sourcecode language="HTML"]<a href="https://misite.com/post-URL/">read more</a>[/sourcecode]

    Could you please give it a try and let me know how that goes? ??

    • This reply was modified 2 years, 9 months ago by Faisal Ahammad. Reason: some html entities has been added so I've to remove
    • This reply was modified 2 years, 9 months ago by Faisal Ahammad. Reason: removed html entities
    • This reply was modified 2 years, 9 months ago by Faisal Ahammad. Reason: On my HTML entities ??
    Moderator bcworkz

    (@bcworkz)

    Customizing the read more link is somewhat complicated and confusing. What to do partly depends on your theme, and partly on how you compose posts (using the <!–more–> tag or not). This is covered in more detail on this Codex page.

    You are using a commercial theme. The support we can provide for commercial themes in these forums is very limited. I suggest you ask through your theme’s dedicated support channel for specifics on how read more can be customized in that specific theme.

    Thread Starter CirceTheHouseCat

    (@circethehousecat)

    Hi @bcworkz thanks for the reply. I’ve already checked the page you have linked, but as I am not so tech savvy I could not find the solution there.

    The theme I use is an old one (GoodNews – Blog & Magazine WordPress Theme) and support is not… supported anymore. The theme last update was in January 2020.

    The <!–more–> tag is not added in post, yet in the home page there is an excerpt of the post, that ends with a “Read more >>” link to the entire post, after 3 lines of text.

    Thanks anyway for taking some time to reply.

    Moderator bcworkz

    (@bcworkz)

    No <!–more–> tag at least eliminates some of the confusion over the best path forward. What to do also depends on whether your theme’s template uses the_content() or the_excerpt() on its template for the page you’re trying to alter. If you’re not sure which template is used, the Template Debugger plugin will help you.

    “Read more>>>” is not the default text, so your theme is already likely altering the text for itself. (it’s also possible for a plugin to do so) Finding out how your theme is doing this will help define a solution. The main methods are either supplying custom text as part of the function call, for example:
    the_content('Read more>>>');

    or, altering the text via filter callback code. If you have difficulty determining how your theme accomplishes this, it’s still possible one of the filter callback code given as examples would work. Enhance chances of success by passing a 3rd argument to the add_filter() call. Pass a somewhat large integer such as 9999.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using Post Tilte in “Read More” link (home page)’ is closed to new replies.