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
add_action('after_setup_theme', function () { | |
add_theme_support('starter-content', [ | |
// 今回はフロントページとしてhomeという固定ページを使用して、ブログのフィードを設置する。 | |
'options' => [ | |
'show_on_front' => 'page', 'page_on_front' => '{{home}}', 'page_for_posts' => '{{blog}}', | |
], | |
// 固定ページの設定「home(トップページ)」「about(コンセプト)」「contact(お問い合わせ)」「blog(ブログ)」 | |
'posts' => [ | |
'home', 'about', 'contact', 'blog' | |
], |
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
'posts' => array( | |
'スラッグ名' => array( | |
'post_type' => 'page', | |
'post_title' => '固定ページのタイトルについて', | |
'post_content' => 'こちらに本文を入れることができます。', | |
'post_excerpt' => 'こちらに抜粋部分の指定ができます。, | |
'file' => 'こちらに使用する画像の設定などができます。例:(images/yukina_birthday.jpg)', | |
'thumbnail' => 'サムネイルの設定ができます。例:(images/yukina_birthday.jpg)', | |
), | |
), |
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
'posts' => array( | |
'samplepage' => array( | |
'post_type' => post, | |
'post_title' => '固定ページのタイトルについて', | |
'post_content' => 'こちらに本文を入れることができます。', | |
'post_excerpt' => 'こちらに抜粋部分の指定ができます。', | |
'file' => 'こちらに使用する画像の設定などができます。', | |
'thumbnail' => 'サムネイルの設定ができます。', | |
), | |
), |
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
'nav_menus' => array( | |
'top_nav' => array( | |
'name' => __('ナビのメニュー名', 'id'), | |
'items' => array( | |
'home_link' =>array( | |
'title'=> 'トップ', | |
'url' => home_url(), | |
), | |
'page_link_01' => array( | |
'title'=> 'メニュー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
'widgets' => array( | |
'サイドバー名' => array( | |
'text_business_info',//項目 | |
'search', | |
'text_about', | |
), | |
), |
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
'attachments' => array( | |
'画像スラッグ' => array( | |
'post_title' => '画像名', | |
'post_content' => '画像本文', | |
'post_excerpt' => '画像抜粋', | |
'file' => '(テーマディレクトリ)/images(フォルダ)/featured-logo.jpg', | |
), | |
), | |
//画像ファイルを設定していると下記のように{{}}で指定が出来ます | |
'posts' => array( |
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
---------------------------------------------------- | |
■使用方法 | |
---------------------------------------------------- | |
投稿内で使用する場合 | |
[news_picup postnum=20 posttype=post categoryslug=カテゴリースラッグ] | |
テンプレート内で使用する場合 | |
news_post_in_template(10,'post','php'); | |
と記載 |
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
---------------------------------------------------- | |
■使用方法 | |
---------------------------------------------------- | |
投稿内で使用する場合 | |
[category_down_menu limit=階層の数(親子孫などの数) parcatid=親となるカテゴリーID categoryslug=0] | |
テンプレート内で使用する場合 | |
allcatlist('階層の数(親子孫などの数)', '親となるカテゴリーID'); | |
と記載 |
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
<section class="calender"> | |
<?php | |
$get_date = filter_input( INPUT_GET, "date" ); | |
if(empty($get_date)){ | |
$year = date('Y'); | |
$month = date('n'); | |
$now_month =date('m'); | |
}else { | |
$year = date('Y',strtotime($get_date)); |
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
add_action('after_setup_theme', function () { | |
add_theme_support('starter-content', [ | |
// 今回はフロントページとしてhomeという固定ページを使用して、ブログのフィードを設置する。 | |
'options' => [ | |
'show_on_front' => 'page', 'page_on_front' => '{{home}}', 'page_for_posts' => '{{blog}}', | |
], | |
// 固定ページの設定「home(トップページ)」「about(コンセプト)」「contact(お問い合わせ)」「blog(ブログ)」 | |
'posts' => [ | |
'home', 'about', 'contact', 'blog' | |
], |
OlderNewer