Hi All, I'm not new to WordPress but I'm new to child functions.php.
Here is the code as it appears in my theme and I would like to place it in a child functions.php so I can tweak bits of it.
I already have a child theme set up, just not sure about what to do next. I am just unclear about renaming the function, and I need to do a remove and add as well, right? not sure how to do that though.
/**
* Set custom post excerpt link if excerpt is supplied manually.
*/
function manual_excerpt_read_more_link($output) {
global $themeslug, $options, $post, $root;
$linktext = $options->get($themeslug.'_excerpt_link_text');
$linktext = $linktext == '' ? 'Continue Reading...' : $linktext;
if(!empty($post->post_excerpt))
return $output . '…</p><div class="more-link"><span class="continue-arrow"><img class="continue_img" src="'.$root.'/images/continue.png"></span><a>ID) . '"> '.$linktext.'</a></div>';
else
return $output;
}
add_filter('the_excerpt', 'manual_excerpt_read_more_link');
[Please post code snippets between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]