实际上我也在尝试这样做。
下面的代码调用该链接,但不像您所要求的那样(包含链接的实际文本)。如果你知道了,请把它贴出来,让我们知道,我真的可以用它!
function get_content_link( $content = false, $echo = false )
{
// allows using this function also for excerpts
if ( $content === false )
$content = get_the_content(); // You could also use $GLOBALS[\'post\']->post_content;
$content = preg_match_all( \'/href\\s*=\\s*[\\"\\\']([^\\"\\\']+)/\', $content, $links );
$content = $links[1][0];
$content = make_clickable( $content );
// if you set the 2nd arg to true, you\'ll echo the output, else just return for later usage
if ( $echo === true )
echo $content;
return $content;
}