Always Show the "Read More" Link When Using the Astra Theme

In post archives, WordPress mostly shows a post excerpt instead of the full post, followed by a “Read more” link. If your post contains tags like “pre” or “code” (and many more), the content of these tags will be removed from the excerpt. This can lead to conditions, where the excerpt does not show the full post, but no read more link is shown (because WordPress removes the “invalid” tags first and then checks for the length).

If you use the Astra Theme, you only have to add some lines of code to your child theme to always show the “Read more” link. The lines of code you have to add are:

    function () {
        // Remove "Read more", conditionally added by astra
        remove_filter('excerpt_more', 'astra_post_link', 1);

        // Add "Read more" to every post
            function ($content) {
                return $content . astra_post_link();

        // Remove "..." added by astra
            function ($value) {
                return str_replace("…", "", $value);

Now, a “Read more” link should appear after every post.