I recently changed the_excerpt() tag using this function:
function new_excerpt_more($text) {
return str_replace('[...]', '[<a href="'. get_permalink($post->ID) . '">' . 'Read the rest of this entry »' . '</a>]', $text);
}
add_filter('the_excerpt', 'new_excerpt_more');
This works great on my homepage, where I wanted users to be forced to read more. It directs them to the permalink for the post. What I did not realize, though, was that when I did this, my search page (also using the_excerpt, and using the One Search plugin to search all of my wpmu sites) makes the permalink in the excerpt think that it is associated with the main site when it should be another site.
For example, if you go to my site at http://nccumc.org, and click "Read the rest of this entry" on any of the first posts with an image, you are directed to the correct permalink because they are assocaiated with the main site. But, if you search for something like this http://nccumc.org/?s=facebook, and you click the "Read the rest of this entry" on the first post, you will get a Page Not Found error. However, if you click the title, it works correctly since it pulls the permalink from The Loop. That link should be part of the "Children" site.
Is there anyway I can dynamically get the real permalink for the post when changing the excerpt?
Thanks for the help! Let me know if anyone needs anymore information.