Skip to content

Instantly share code, notes, and snippets.

@sdeluce
Last active August 29, 2015 14:21
Show Gist options
  • Select an option

  • Save sdeluce/734b923e256de40be1a2 to your computer and use it in GitHub Desktop.

Select an option

Save sdeluce/734b923e256de40be1a2 to your computer and use it in GitHub Desktop.
Add custom html after the_content in Wordpress
<?php
function insertFootNote($content) {
if(!is_feed() && !is_home()) {
$content.= "<div class='subscribe'>";
$content.= "<h4>Enjoyed this article?</h4>";
$content.= "<p>Subscribe to our <a href='http://feeds2.feedburner.com/WpRecipes'>RSS feed</a> and never miss a recipe!</p>";
$content.= "</div>";
}
return $content;
}
add_filter ('the_content', 'insertFootNote');
// You can use the_exerpt, the_title, ...
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment