[wp-hackers] Can't seem to override more link

Chris McCoy chris at lod.com
Fri Aug 31 18:34:05 UTC 2012


function new_excerpt_more($more) {
        return '<a class="more-link"
href="'.get_permalink().'">more...</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');

something like this?

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Micky Hulse
Sent: Friday, August 31, 2012 2:27 PM
To: wp-hackers at lists.automattic.com
Subject: [wp-hackers] Can't seem to override more link

Working on a custom theme... We're using <!--more--> in the posts.

Long story short, I'd like to modify the class that's applied to the href:

<p>
<a class="more-link"
href="http://50.112.124.120/blog/2012/08/20/looks-like-more-wednesdays-in-pa
c-12-schedule/#more-27">Continue
reading</a>
</p>

On the template:

<?php the_content(); ?>

I've setup a function to override the excerpt:

...
add_filter('excerpt_more', 'crazy_excerpt_more'); ...

That does not seem to work... All I get is "(more...)" output on my page.

I assume the "excerpt_more" does not apply to <!--more--> via
the_content() function?

I've read through the docs, but I'm having troubles piecing things together.
Any tips and/or pointers would be great!

Thanks!
M
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list