Insert same image on every post, not page
-
Hi,
I’m currently using the following code in my functions.php file:
add_filter ('the_content', 'my_content_filter'); function my_content_filter ($content) { $extra_html = '<p>Link to my image</p>'; return $content.$extra_html; }
This works but it is adding this on every page and post. I only wish to include this on my blog posts. I tried changing ‘the_content’ to ‘the_post’ but that didn’t work. I know this is really simple but I’m a bit rusty!
Any pointers would be appreciated, thank you.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Insert same image on every post, not page’ is closed to new replies.