Support » Fixing WordPress » How can I add a horizontal image in between posts?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Chris Olbekson

    (@c3mdigital)

    Level 12 Bug Squasher & Forum Moderator

    You can add a filter to the content to display the image after every post.

    function funny_cat_filter( $content ) {
        $content .= '<img src="http://funnylolcats.com/lolcatz.jpg" />';
    
       return $content;
    
    }
    
    add_filter( 'the_content', 'funny_cat_filter' );

    Doug

    (@brainiacwebdesigns)

    so this code goes where then? you said to the content which makes me think add it html to each post but that doesn’t seem right to me so i’m thinking you mean to put it somewhere else

    it’s a function – which would go in functions.php!

    Doug

    (@brainiacwebdesigns)

    lol thank you!

    No problem! It seems obvious to some of us who’ve done this a bit – but when you are new to this stuff, it’s not so obvious!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can I add a horizontal image in between posts?’ is closed to new replies.