Moderator
t-p
(@t-p)
Try:
– switching to the default theme by renaming your current theme’s folder inside wp-content/themes and adding “-old” to the end of the folder name using FTP or whatever file management application your host provides.
– resetting the plugins folder by FTP or phpMyAdmin.
I don’t understand why you are saying that.
I deleted the faulty functions.php file out of my child theme and the site is fine, but I just can’t code the thing that I want to do.
What I want to do is get my homepage post excerpts to be longer than the current setting before they go to […] Read More.
This is the code I was given for the child functions.php, but it keeps giving parse errors – UNEXPECTED T_STRING ON LINE 13:
1. <?php
2. function twentytwelvechild_custom_excerpt_length( $length ) {
3. return 100;
4. }
5. add_filter( 'excerpt_length', 'twentytwelvechild_custom_excerpt_length', 100 );
6.
7. function twentytwelvechild_new_excerpt_more($more) {
8. global $post;
9. return ' <a href="'. get_permalink($post->ID) . '">Read the rest...</a>';
10. }
11. add_filter('excerpt_more', 'twentytwelvechild_new_excerpt_more');
12.
13. ?>
And why would I want to reset the plugins folder?
Is the code OK as is, I mean, this is the entire functions.php content in the child theme. Does it need anything else in order to work in conjunction with the parent theme?
Try this one
<?php
function twentytwelvechild_custom_excerpt_length( $length ) {
return 100;
}
add_filter( 'excerpt_length', 'twentytwelvechild_custom_excerpt_length');
function twentytwelvechild_new_excerpt_more($more) {
global $post;
return ' <a href="'. get_permalink($post->ID) . '">Read the rest...</a>';
}
add_filter('excerpt_more', 'twentytwelvechild_new_excerpt_more');
?>
Tried it.
Parse error: syntax error, unexpected T_STRING in /home/diann/public_html/wp-content/themes/twentytwelve-child/functions.php on line 13
No-one can see anything wrong, but it just doesn’t work. I’m back to just the parent functions.php for now. But I really do want to make the post excerpts longer!