Advertisement
miriamdepaula

WordPress: Add some content after posts

Dec 2nd, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. <?php
  2. //ABRA O ARQUIVO FUNCTIONS.PHP DO SEU TEMA E ADICIONE O SEGUINTE TRECHO DE CÓDIGO:
  3.  
  4. function wpmidia_after_post_content($content) {
  5.     if(!is_feed() && !is_home() && is_singular() && is_main_query()) {
  6.         $content .= '<p>Conteúdo a ser inserido após o post.</p>';
  7.     }
  8.     return $content;
  9. }
  10. add_filter('the_content', 'wpmidia_after_post_content');
  11.  
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement