WordPress Theme Development 17 - Archives Template

We decided to change the archives template to be different from main index template.

Archives means to be summary of a category, tag or date. The major different between these two template is using template tag, the_excerpt(), in archives template, as shown as below:

But the default, using this template tag, the_excerpt(), will be showing first 55 words of the post's content. I do felt it is a bit long for me. I need to customized it. But how? Arron showed us how to customize this template tag, the_excerpt(). We need to add customized excerpt function to replace the default excerpt function, wp_trim_excerpt in theme functions file, functions.php as shown at below. Currently the only changes that different from default is at line 57. Changed the "55" to "8".

References

Comments

Comments powered by Disqus