Functions.php in child theme – need syntax
-
I’ve been trying to get RSS feeds to display entire posts on external site embeds, and someone kindly pointed me to twentyeleven_excerpt_length in functions.php. I changed it from the default “40” (words) to “500”, which is more than I’ll ever need, and it works fine – posts are no longer truncated.
However, for that change to survive the next theme update I’ll need to move it to the child theme, of course. The comment-text in functions.php tells me how, but I don’t know the file layout well enough to know if I’m doing it slightly wrong.
I had a go, anyway. Here’s the entire text of functions.php in my child theme, it doesn’t currently work.
<?php function new_excerpt_length($length) { return 500; } add_filter('excerpt_length', 'new_excerpt_length'); ?>I know this is probably a really simple formatting problem – I’ve just no idea where to start, or what obvious thing I need to include.
The topic ‘Functions.php in child theme – need syntax’ is closed to new replies.