WordPress Themes Development Question: Download WordPress Theme Development PDF
Explain me how to Change the Length of the Default WordPress Excerpt?
Answer:
The default WordPress excerpt is 55 words long. By modified bit to your functions.php file you can change the length to as you required.Below is the code if we need 60 length.
function new_excerpt_length($length) {
return 42;
}
add_filter('excerpt_length', 'new_excerpt_length');
function new_excerpt_length($length) {
return 42;
}
add_filter('excerpt_length', 'new_excerpt_length');
Previous Question | Next Question |
Explain me how to run database Query in WordPress? | Explain me how to add option for open menu item in new tab? |