Add Custom Content at the End of Each Post in WordPress

/* Custom Text at the End of Each Post */
if ( ! function_exists( 'wpflt_post_end_content' ) ) {
    function wpfltr_post_end_content( $content ) {
        if ( is_single() ) {
            $content .= '<strong>Custom Text:</strong> Did you find this useful? Let us know in the Comments';
        }
        return $content;
    }}
add_filter( 'the_content', 'wpfltr_post_end_content' );

If you want to display a custom ‘thank you’ message at the end of each post in WordPress, add the mentioned code to your child theme’s functions.php.

In the code we have used is_single() function. If you want to display the same content to your pages as well, use is_singular().

Or, if you want to display custom text only at the end of each page in WordPress, use is_page() instead.