CCeliaS on "Modify target of "Read More" link when using the_excerpt"

ساخت وبلاگ

Hi all,

I'm stuck. I'm working on a site that has a Parallax Banner that takes up most of the screen height.

I'm trying to modify the function that creates my "read more" links after my excerpts in my Recent Posts to link to #content id in my single.php.

I'm using the suggestion from the Codex on Customizing the Read More, (see below) but I don't know enough .php to be able to insert the anchor tag (#content) that I'd like to postpend to the get_permalink without breaking the code.

// Replaces the excerpt "Read More" text by a link
function new_excerpt_more($more) { global $post; retu '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read More...</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');

Thoughts?

Many thanks in advance!

CCeliaS
Member
Posted 2 minutes ago #

I'm moving this question over to the Hacks forum, where I think it belongs....

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 262 تاريخ : شنبه 5 تير 1395 ساعت: 9:29