This website uses cookies to remember you and improve your experience. For more info see our Privacy Policy.

Choose which cookies you allow
Necessary Required for the site to work, such as remembering this choice. Always active

  • About
  • Websites
    • Business Websites
    • Author Websites
  • SEO
  • Portfolio
    • Author Web Design
    • Business Web Design
    • Custom Graphics
    • Logos
  • Services & Pricing
    • Author Website Packages
    • Website Hosting
    • Page Speed Optimization
    • SEO
    • Local SEO
  • MyBookTable
    • MyBookTable Support
  • Contact
  • Hire Us

Mobile Menu

  • Menu
  • Skip to right header navigation
  • Skip to main content

Stormhill Media

Custom websites for every type of business

Header Right

  • About
  • Websites
    • Business Websites
    • Author Websites
  • SEO
  • Portfolio
    • Author Web Design
    • Business Web Design
    • Custom Graphics
    • Logos
  • Services & Pricing
    • Author Website Packages
    • Website Hosting
    • Page Speed Optimization
    • SEO
    • Local SEO
  • MyBookTable
    • MyBookTable Support
  • Contact
  • Hire Us

add_filter

Home » Code Snippets » add_filter

Quick Simple example of add_filter – sticking something in the bottom of the_content().

// filter to add stuff to the end of content in posts
function add_stuff_to_content($content) {
global $post;
	if ( 'post' != get_post_type() ) { // limit this to only the post type you want to alter
		return $content; //exit;
	}
	$original = $content;
	$morestuff .= '<div class="stuff">Extra Stuff!!</div>';
	
	$thecontent = $original.$morestuff; // puts more stuff right after post
	return $thecontent;
}
add_filter(the_content, add_stuff_to_content);
« Previous
Next »

Site Footer

Quick Links:

  • Contact Us
  • Pricing & Services
  • Sitemap
  • Terms/Conditions
  • Privacy Policy
  • Business Websites
  • Author Websites
  • SEO Services
(903) 213-5266‬

Copyright © 2026 · Stormhill Media All Rights Reserved.
Website by Stormhill Media
Log in