August 11, 2017 php Wordpress 0

This is a simple code to add extra content after the content of a page or post in a WordPress website. Just paste the code intop your plugin’s or theme’s functions.php file, and edit it to your preference:

1
2
3
4
5
6
7
8
9
10
function wpb_after_post_content( $content ) {
       
            $custom_content = "Add custom content here";       

            return $content . $custom_content ;
       
       
    }
   
    add_filter( "the_content", "wpb_after_post_content", 99, 2 );