第四演出室/WordPress
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(第四演出室)
*年齢計算 [#i39d6642]
-「外観」→「テーマ編集」→functions.phpに追加
/*
誕生日から年齢を算出
[get_age birth="19850101"]
*/
function sc_get_age($atts) {
extract(shortcode_atts(array(
'birth' => '',
), $atts));
return (int)((date('Ymd') - $birth)/10000);
}
add_shortcode('get_age', 'sc_get_age');
[get_age birth="19850101"]才
フッターのテンプレートの該当位置に下のコードを挿入してく...
Copyright© 2011–<?php echo date('Y'); ?> <?php bloginfo(...
//https://plusblog.jp/6864/
#navi(第四演出室)
終了行:
#navi(第四演出室)
*年齢計算 [#i39d6642]
-「外観」→「テーマ編集」→functions.phpに追加
/*
誕生日から年齢を算出
[get_age birth="19850101"]
*/
function sc_get_age($atts) {
extract(shortcode_atts(array(
'birth' => '',
), $atts));
return (int)((date('Ymd') - $birth)/10000);
}
add_shortcode('get_age', 'sc_get_age');
[get_age birth="19850101"]才
フッターのテンプレートの該当位置に下のコードを挿入してく...
Copyright© 2011–<?php echo date('Y'); ?> <?php bloginfo(...
//https://plusblog.jp/6864/
#navi(第四演出室)
ページ名: