Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Html snippet to all of the posts

Discussion in 'Misc WordPress Requests' started by paulwpxp, Dec 12, 2017.

  1. paulwpxp


    Reply To: Html snippet to all of the posts, by paulwpxp

    In case you do have some php coding experiences, just add this function to your child theme (or wrap it in a plugin format and use it).

    function my_add_after_content($content) {
    if( is_single() && is_main_query() ) {
    $new_content = '<p class="myaftercontent">This is to added after content</p>';
    $content = $content . $new_content;
    return $content;
    add_filter('the_content', 'my_add_after_content');

    But honestly, I would use this kind of plugin, Add Widget After Content, that adds sidebar area to the end of post so that we can use text widget (which now offers html and image functionality) in it.

    Add Widget After Content

    Reply To: Html snippet to all of the posts

Share This Page

Monarch Social Sharing Plugin