Wordpress - modifying excerpts


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. -----------------------------
  2. Functions.php
  3. -----------------------------
  4.  
  5. <?php function new_excerpt_length($length) {
  6. return 8;
  7. }
  8. add_filter('excerpt_length', 'new_excerpt_length'); ?>
  9.  
  10. ----------------------------------------
  11. Functions.php > remove brackets on dots
  12. ----------------------------------------
  13.  
  14. function new_excerpt_more($more) {
  15. return '[.....]';
  16. }
  17. add_filter('excerpt_more', 'new_excerpt_more');

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.