WordPressカスタマイズ ②

前回の続きで、自分用のメモとして書いていきます。

 

6.【bloginfo('〇〇')】

 ブログの各情報を表示するための関数

 

bloginfo('url') ブログのURLを表示

bloginfo('title') ブログのタイトルを表示

bloginfo('description') 説明文を表示

 

7.【the_〇〇】

 個別記事の各情報を表示する関数

 

 the_post() 記事情報の表示

 the_title() タイトルの表示

 the_content() 本文の表示

 the_excerpt() 抜粋の表示

 the_category() カテゴリーの表示

 the_permalink() リンクの表示

 the_date(),the_time() 投稿日時の表示

 

8.【is_〇〇】

 現在表示中のページ(条件分岐に使う)

 現在、ユーザーが表示しているページを示す関数で、ページによって処理を分けたいときに使用する。

 

 is_home() ブログのトップページ

 is_front_page() 基本的には「is_home()」と同じ

         トップページの指定によっては変わる

    is_single() 個別記事

 is_page() 固定ページ

 

9.【include(〇〇)】

 ファイルの読み込み関数

 include(TEMPLATEPATH. '/myfile.php');

 なら、テンプレートディレクトリ内の「myfile.php」を読み込む

 <?php ?>で囲む

 

 

wordpress/wp-content/themes/twentyten<テーマ名>/

 

style.cssの記述

・Theme Name : テーマ名

・Theme URI : テーマのURI

・Description : テーマの説明

・Author : テーマの制作者

・Author URI : テーマ制作者のURI

・Version : テーマのバージョン