Add custom fields to excerpt
-
I am trying to call custom fields to my excerpt for each post but when I change the code in the functions.php for excerpts my site breaks.
I currently have:
function excerpt($limit) { $excerpt = explode(' ', get_the_excerpt(), $limit); if (count($excerpt)>=$limit) { array_pop($excerpt); $excerpt = implode(" ",$excerpt); } else { $excerpt = implode(" ",$excerpt); } $excerpt = preg_replace('<code>[[^]]*]</code>','',$excerpt); return $excerpt; }
I want to call three custom fields that I have set up in my posts but when I try to add code the site breaks…
Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add custom fields to excerpt’ is closed to new replies.