How to put “Read more” link in Custom Excerpt inside p tag?
One approach is: //… // this is the resulted paragraph without the enclosing <p> and </p> $first_para_inner_text = $matches [1] [1]; // <– the index changed $link = get_permalink($post); // rebuilding the p $first_para=”<p>” . $first_para_inner_text . ‘ <a href=”‘.$link.'”>Read More</a></p>’; echo $first_para; Not tested, but you may get the idea. Just need to modify/change … Read more