Posted By

screamwork on 06/30/10


Tagged

wordpress


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

artificialid
mikoli


customize content in Wordpress


 / Published in: PHP
 

  1. $full_content = false;
  2. function childtheme_content($content) {
  3. if ($full_content) {
  4. $content= 'full';
  5. } elseif (is_home() || is_front_page()) {
  6. $content= 'excerpt';
  7. } elseif (is_single()) {
  8. $content = 'full';
  9. } elseif (is_tag()) {
  10. $content = 'excerpt';
  11. } elseif (is_search()) {
  12. $content = 'excerpt';
  13. } elseif (is_category()) {
  14. $content = 'excerpt';
  15. } elseif (is_author()) {
  16. $content = 'excerpt';
  17. } elseif (is_archive()) {
  18. $content = 'excerpt';
  19. }
  20. return $content;
  21. }
  22. add_filter('thematic_content', 'childtheme_content');

Report this snippet  

You need to login to post a comment.