Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function excerpt_readmore($more) { | |
return '... <a href="'. get_permalink($post->ID) . '" class="readmore">' . 'Read More' . '</a>'; | |
} | |
add_filter('excerpt_more', 'excerpt_readmore'); | |
?> | |
/*抜粋表示でも「続きを読む」リンクを作る*/ | |
<?php the_excerpt(); ?> |
Note
Description | functions.phpに追記。the_excerpt()で抜粋表示した後に「続きを読む」を加える。文字列は任意のものに変更してもOK。 |
---|---|
WordPress Ver. | 3.3.1 |
Via | Add “Read More” permalink to the end of the_excerpt |