customize content in Wordpress


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



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.