2016-04-19 21 views
-1

我想顯示:內容限制應爲0,閱讀更多鏈接也出現在創世紀。這是我的代碼:當我設置內容限制0時,更多的鏈接在創世中消失爲什麼?

add_filter ('get_the_content_more_link', 'custom_read_more_link'); 
function custom_read_more_link() { 
    return '... <a class="more-link" href="' . get_permalink() . '">Read More</a>'; 
} 

如果有人知道答案,請幫忙。提前致謝。

+0

你不」不給任何代碼,你的問題根本不明確。 –

+0

/*這是我的代碼閱讀更多鏈接*/add_filter('get_the_content_more_link','custom_read_more_link'); function custom_read_more_link(){ return'... Read More'; } –

回答

0

轉到儀表板>>內容歸檔並設置顯示選項進入摘錄

複製下面的代碼添加到functions.php

//* Modify the length of post excerpts 
add_filter('excerpt_length', 'sp_excerpt_length'); 
function sp_excerpt_length($length) { 
    return 0; // pull first 0 words 
} 
+0

感謝您的回覆,但它不工作 –

+0

你還有什麼在你的functions.php?你不需要函數中的'custom_read_more_link'。 – Imsa

+0

刪除'custom_read_more_link'後,閱讀更多鏈接也不顯示.. –

相關問題