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 | |
//WordPress × Bootstrap ページネーション | |
//$range : 表示中のページの前後何件までリンクを表示させるか | |
function pagination( $range = 3 ){ | |
//paged = 表示中のページ | |
global $paged; | |
if(!$paged){ $paged = 1;} | |
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 | |
//descriptionの設定 | |
function set_description(){ | |
global $post; | |
$content = $post->post_content; | |
//トップページ | |
if ( is_front_page() ) { | |
$desc = get_bloginfo('name').":".get_bloginfo('description'); |
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 | |
//WordPress抜粋表示の変更 | |
/**** | |
1.抜粋があれば抜粋表示 | |
2.moreタグがあれば、それに従う | |
3.$lengthより文字が少なければ、そのまま表示 | |
4.$lengthより文字が多ければ抜粋表示 | |
****/ | |
function set_excerpt( $length =200){ | |
global $post; |