Change the number of words in Excerpt mode view
-
Hi,
In Excerpt mode each post display 55 words before it shows the “continue reading” button.
Any way to change this number of words?
And also make show like it should be? every row in a new row? and not the whole words one after the other with no row break?
Thanks,
Udi.
Try this function,
function custom_excerpt_length($length) {
return 40;
}
add_filter('excerpt_length', 'custom_excerpt_length');Here I’ve set the number of words to 40. Change it to whatever the number.
read these posts first
graphene-support/how-to-modify-the-theme-using-a-child-theme
This is on prasanna’s signature
Quote:read these posts firstgraphene-support/how-to-modify-the-theme-using-a-child-theme
This is on prasanna’s signature
http://www.prasannasp.net/graphene-child-theme-template/
read the post, and still can’t figure out how to make this child theme to work.
I’ve created it as explained, created also the functions.php added the following code into it:
<?php
function custom_excerpt_length($length) {
return 30;
}
add_filter(‘excerpt_length’, ‘custom_excerpt_length’);
?>
But the posts are still with the 55 words.
Any better guide? as the one in the link shows only what to do with the style.css.
I’m doing all tests here: http://www.udiburg.com/blog2
Many thanks.
Your child theme looks set up correctly. It is adding to your site… and pulling the parent theme stylesheet. This is correct.
Regarding the functions.php file. It should sit along side the style.css file.
= wp-content
== themes
=== graphene
=== graphene-child
==== style.css
==== functions.php
Here is a video I threw together a few months ago…
http://www.joshlobe.com/2011/10/video-tutorial-creating-a-child-theme-in-wordpress/
Viewing 10 posts - 1 through 10 (of 11 total)
- 1
- 2
- You must be logged in to reply to this topic.