WordPress Themes Development Question: Download Questions PDF
Explain me how to Change the Length of the Default WordPress Excerpt?
![WordPress Theme Development Interview Answer WordPress Theme Development Interview Question](https://globalguideline.com/public/images/interview/26.png)
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');
Download WordPress Theme Development Interview Questions And Answers
PDF
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? |