• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Add Text Content After Single Posts In Any Theme

This PHP code enables you to conditionally display any type of content after single posts.

It includes a conditional tag which can be changed.

You’ll also notice the .= ( dot and equals sign )

These are called PHP string operators which basically add your custom content to the default content using a filter before printing it to the page.

StudioPress Theme Users

If your theme includes hooks, you can still use the code above or your theme specific hooks:

Here’s a basic example of what the code looks like for StudioPress users:

function wpsites_after_content() {
	
if( is_singular('post') ) {
		
echo'<div class="after-post">Add Content</div>';
       }
}
add_action('genesis_entry_footer', 'wpsites_after_content', 5 );

NO need to filter the content. Simply hook it in using your themes hooks.

Related Solutions

  • Add After Post Widget Area In Genesis
  • How To Add A New After Post Widget In Thesis
  • Add Generate Box After Single Posts

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags