[英]How to create 3 dots and bracket excerpt and link to blog articles (wordpress)
我有一個 WordPress 網站,我剛從另一個 Web 開發人員那里得到,博客文章中有以下摘錄:[...]
我如何才能為這些括號和點添加功能以鏈接到博客文章?
使用此代碼:
function new_excerpt_more($more) {
global $post;
return '<a class="moretag" href="'. get_permalink($post->ID) . '"> [...]</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.