i'm working on a blog page.i'm trying to use excerpt() function to add "read more" tag to get to the full content page and the comment section. there is a div like this
<div class="post-excerpt">
<?php the_excerpt(); ?>
</div>
and then i added the function we all know that should be there in functions.php
function new_excerprt_more($more){
global $post;
return '...<a class="moretag" href="'.get_permalink($post->ID). '">Continue reading</a>';
}
add_filter('excerpt_more','new_excerprt_more');
so far so good no problem till here. the problem is that when i click on "continue reading" tag it exactly shows me the excerpt(with continue reading tag) plus the comment section instead of showing full content(without continue reading tag) plus the comment section.
so it seems that "get_permalink($post->ID)" is not actually doing his job correctly and i have no idea why. besides i have a header in blog page that has a php code like this
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>'
and this one doesn't work either!(should do the same thing like continue reading". so does anybody know what the heck is going on!?