Tuesday, 28 May 2013

Include post title in readmore link?

Trying to include the post title in my excerpt readmore links. I've read the codex on this, but my theme files are much more complicated so I could use a bit of expert help...
Extract from functions.php:
function theme_get_excerpt($args = array()) {
global $post;
$more_tag = theme_get_array_value($args, 'more_tag', __('My Words...<span class="meta-nav">&rarr;</span>', THEME_NS));
$auto = theme_get_array_value($args, 'auto', theme_get_option('theme_metadata_excerpt_auto'));
$all_words = theme_get_array_value($args, 'all_words', theme_get_option('theme_metadata_excerpt_words'));
$min_remainder = theme_get_array_value($args, 'min_remainder', theme_get_option('theme_metadata_excerpt_min_remainder'));
$allowed_tags = theme_get_array_value($args, 'allowed_tags',
...and from further down the file...
if ($show_more_tag) {
    $excerpt = $excerpt . ' <a class="more-link" href="' . $perma_link . '">' . $more_tag . ' </a>';
Any ideas how to include the post title within the readmore permalink??? Thanks

No comments:

Post a Comment