• Home
  • Project
  • Slider
  • Custom Website Design
  • Services
  • Social Media
  • Blog
  • Contact
    • Request a Quote

Areuconnected.com

Just another WordPress site

  • Home
  • Code Snippets
  • Genesis
You are here: Home / Code Snippets / Insert custom content after single post

Insert custom content after single post

September 23, 2011 by onnoysomoy 3 Comments

For a client’s blog website I need to add a para automatically after each single post, found a snippet from Jeff Starr using a WordPress hook. Here’s how to do.

add_filter('the_content', 'add_post_content')
function add_post_content($content) {
	if(!is_single()) {
		$content .= '<p>YOUR CONTENT GOES HERE'</p>';
	}
	return $content;
}

If you enjoyed and find helpful this article, please consider sharing it.

Filed Under: Code Snippets Tagged With: action hooks, code, PHP, snippetes, snippets, tips, tricks, WordPress

Comments

  1. proxy list says:
    December 30, 2011 at 8:30 pm

    I’m a long time watcher and I just believed I’d drop by and say hello there for your very first time.

    Reply
  2. Isaias Chainey says:
    January 8, 2012 at 4:49 pm

    I genuinely value your work , Great post.

    Reply
  3. Andi says:
    January 14, 2012 at 6:41 pm

    Call me wind bceuase I am absolutely blown away.

    Reply

Speak Your Mind Cancel reply

*

*

Recommended Hosting

cpanel shared hosting

Company info

  • Home
  • About
  • Portfolio
  • Services
  • Qoute Us
  • Contact Us

Receive great tips via email

Our Partners

  • partners
  • partners
  • partners
  • partners

Top Stories

  • Removing genesis post_info from a Single or multiple Category
  • Insert custom content after single post
  • How to Add an Additional Wrap on Genesis Child Theme
  • Genesis Framework – Footer
  • Customizing Genesis Footer Content

Valid XHTML 1.0 Transitional