Last active
August 29, 2015 14:21
-
-
Save sdeluce/734b923e256de40be1a2 to your computer and use it in GitHub Desktop.
Add custom html after the_content in Wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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