Php wordpress自定义字段添加阅读更多链接
我对get\u post\u meta的查询有问题。。我试图修剪自定义字段文本的长度,并在文本末尾添加一个readmore。我正在使用这个代码Php wordpress自定义字段添加阅读更多链接,php,wordpress,Php,Wordpress,我对get\u post\u meta的查询有问题。。我试图修剪自定义字段文本的长度,并在文本末尾添加一个readmore。我正在使用这个代码 $trim_length = 20; $value_more = '(...)'; $custom_field = 'description'; $description = get_post_meta($post ->ID, 'description', true); if ($description) { echo wp_trim_words
$trim_length = 20;
$value_more = '(...)';
$custom_field = 'description';
$description = get_post_meta($post ->ID, 'description', true);
if ($description) {
echo wp_trim_words($description, $trim_length, $value_more);
}
我想获得扩展文本字段的选项,而不是打开新链接
我希望你能帮助我。我想你在找我
the_extract()
这是post循环中的wordpress函数调用之一。谢谢你,jitendra yadav,我会看一下。。