Read more after a manual topic

hi there,
can you explain to me how i can add a “read more” after a manually made excerpt? And how to change the “read more” tekst into the dutch “lees meer”.

i started using cornerstone for my latest blogpost:
and i found out that i have to manually add an expert. that worked.
but now i cannot find how to end the excerpt with the “lees meer” link.

thank you

Hi There,

Thanks for writing in! Could you please try adding the following code into your child theme’s functions.php file. If you don’t have a child theme setup yet, please refer (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).

// Adding Excerpt to Posts 
function excerpt_read_more_link($output) {
   global $post;
   return $output . '<a class="my-readmore-link" href="'. get_permalink($post->ID) . '"> Read More</a>';
}
add_filter('the_excerpt', 'excerpt_read_more_link');

Hope that helps.

oke. i know i installed a child theme, but can you help me a bit where to find that again?
i recently started updating my website after a while not having been on it on a “fundamental” level. :slight_smile:

Hi There,

When you connect to your server through FTP, it should be there on the following location.

public_html/wp-content/themes/x-child/

Thanks!

no, i work directly online, in chrome.

So, i dont know where to find the functions.php.
I do know how to find the customizre/custom/add global css.

So, do i add something in the customizer?

txs

Hi there,

It would be safe to edit the files through FTP just in case there is an error with the code, you can easily fix it,

But if you want to add the code through the admin panel, you can do so by going to Appearance > Editor then select functions.php

Hope this helps.

oke, i added it in the editor. And now? Where can i find it and use it for the blogposts? txs

Hi wonderacademie,

I’ve checked your website and I can see the “Read more” link is appearing fine:

You just need to add a custom excerpt (manual) in every post as you did in the first post, you can only change “Read More” in the code snippet mentioned above to “lees meer” as you like.

Thanks.

thanks. I’ll change it in the php. Nice!
& yes, i saw later that it worked. Apparantly that look some time to be processed :).
haha, so now the happy job of making a manual except for ALL the blogs. My goodness …

Glad it’s working now and you’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.