コンサデコンサにTwentyFourteen 2.0を導入する際の設定項目

TwentyForteenがアップデートした。

コンサデコンサに、TwentyFourteen 2.0を導入する際の設定項目の覚え書き。

使用テーマ:TwentyFourteen 2.0


TwentyFourteen 2.0本体

【抜粋表示の設定】

メインインデクス、カテゴリー、アーカイブ、検索結果を表示するページは全て抜粋表示にした。


【タイトルのアルファベットが自動で大文字表示になるのを停止する】


【サムネイルの表示方法を変更する】
既存のCSSに追記ではなく、変更するので、子テーマのStyle.cssではなく、Twenty Fourteenのstyle.cssを書き直す。


【Featured表示項目の縦の長さの調節】
既存のCSSに追記ではなく、変更するので、子テーマのStyle.cssではなく、Twenty Fourteenのstyle.cssを書き直す。


【ポスト投稿やカスタム投稿にタクソノミータグを表示】

今回の変更内容:content.phpを修正
カスタム投稿のpost typeとTaxonomyが増えたので現時点での修正内容を下記に記述する。

[php]
‘, ”, ‘

‘ );
?>
[/php]

↓↓↓
[php]
タグ:‘, ”, ‘

‘ ); ?>
ID, ‘appellation’, ‘

項目タグ:‘, ”, ‘

‘ ); ?>
ID, ‘biography’, ‘

人名タグ:‘, ”, ‘

‘ ); ?>
ID, ‘terminology’, ‘

名称タグ:‘, ”, ‘

‘ ); ?>
ID, ‘geography’, ‘

場所タグ:‘, ”, ‘

‘ ); ?>
ID, ‘sportsevents’, ‘

大会タグ:‘, ”, ‘

‘ ); ?>
ID, ‘clubname’, ‘

クラブタグ:‘, ”, ‘

‘ ); ?>
ID, ‘stadiumname’, ‘

競技場タグ:‘, ”, ‘

‘ ); ?>
ID, ‘guidebook-cat’, ‘

コンサガイド分類:‘, ”, ‘

‘ ); ?>
ID, ‘annual-cat’, ‘

CSアニュアル分類:‘, ”, ‘

‘ ); ?>
ID, ‘scorebook-cat’, ‘

CSスコアブック分類:‘, ”, ‘

‘ ); ?>
ID, ‘players-cat’, ‘

CSプレイヤーズ分類:‘, ”, ‘

‘ ); ?>
ID, ‘lexicon-cat’, ‘

CSレキシコン分類:‘, ”, ‘

‘ ); ?>
ID, ‘links-cat’, ‘

CSリンクス分類:‘, ”, ‘

‘ ); ?>
ID, ‘addressbook_cat’, ‘

アドレスブック分類:‘, ”, ‘

‘ ); ?>
ID, ‘catalogue-cat’, ‘

コンサシェルジュ分類:‘, ”, ‘

‘ ); ?>
ID, ‘syllabary’, ‘

五十音順:‘, ”, ‘

‘ ); ?>
[/php]


【フッタ部分】
footer.phpを修正。

Proudly powered by WordPressの制御文の後ろに

| Copyright © 1996-2017 CONSA DE CONSA

を書き足す。


【コンサペディア】

(CSリンクス)


【INDEX】

(最近のコメント)

WordPressのディレクトリ内の テーマ>Twentyfourteen のディレクトリに、mycomments.phpファイルをアップする。


【子テーマ】

子テーマの内容は、アップデートには影響ないので、特にいじらず。

【パンくずリスト】

加工するのは、Full-widthテンプレートで、子テーマ内にあるので、修正せず。

通常ページのパンくずリストは、サイドバーにウイジッドを用いて表示。
Full-widthテンプレートのパンくずリストはテンプレートを書き換える。
ともにBreadcrumb NavXT を使う。

【カスタム投稿を、アーカイブページに表示】

子テーマのfunction.phpに追記。

ホームのアーカイブページにだけ、カスタム投稿を表示しないため、三つの例文のうち、一つは使わない。

[php]
/*
* Add custom post archive
*/

add_action( ‘pre_get_posts’, ‘category_any_posts’ );
function category_any_posts( $query ) {
if ( $query->is_category && $query->is_main_query() ) $query->set( ‘post_type’, ‘any’ );
}

add_action( ‘pre_get_posts’, ‘add_post_tag_archive’ );
function add_post_tag_archive( $wp_query ) {
if ($wp_query->is_main_query() && $wp_query->is_tag()) {
$wp_query->set( ‘post_type’, ‘any’ );
}
}

[/php]


表示を左端固定表示から中央揃えに変更

CSSの変更箇所は、子テーマ内のCSSに。

いくつかのウイジッドのCSSも子テーマ内に記述

full-widthのテンプレートも子テーマ内なので、特にいじらず。

widgetのCSSも子テーマ内のCSSに。

以上、現時点での子テーマCSSでの設定項目

Hタグのタイトルデザイン
fullwidthtemplateのCSS
bladcrambのCSS
List Styleの WidgetsのCSS
(試験中の横線(hrタグ)用のCSS)

記述が必要な場合は、バックアップから復元。

アーカイブページにカスタムタクソノミーやカスタム投稿の説明文を表示する。子テーマ内に記述しているので、特にいじらず。

[php]

name );

elseif ( is_tax( ‘scorebook-cat’ ) ) :
printf( __( ‘CSスコアブックアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘scorebook-cat’ )->name );

elseif ( is_tax( ‘players-cat’ ) ) :
printf( __( ‘CSプレイヤーズアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘players-cat’ )->name );

elseif ( is_tax( ‘lexicon-cat’ ) ) :
printf( __( ‘CSレキシコンアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘lexicon-cat’ )->name );

elseif ( is_tax( ‘syllabary’ ) ) :
printf( __( ‘五十音順アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘syllabary’ )->name );

elseif ( is_tax( ‘guidebook-cat’ ) ) :
printf( __( ‘コンサガイドアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘guidebook-cat’ )->name );

elseif ( is_tax( ‘cdc-contents’ ) ) :
printf( __( ‘コンテンツ分類アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘cdc-contents’ )->name );

elseif ( is_tax( ‘biography’ ) ) :
printf( __( ‘人名別アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘biography’ )->name );

elseif ( is_tax( ‘appellation’ ) ) :
printf( __( ‘項目別アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘appellation’ )->name );

elseif ( is_tax( ‘terminology’ ) ) :
printf( __( ‘名称別アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘terminology’ )->name );

elseif ( is_tax( ‘geography’ ) ) :
printf( __( ‘場所別アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘geography’ )->name );

elseif ( is_tax( ‘sportsevents’ ) ) :
printf( __( ‘大会別アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘sportsevents’ )->name );

elseif ( is_tax( ‘clubname’ ) ) :
printf( __( ‘クラブ別アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘clubname’ )->name );

elseif ( is_tax( ‘stadiumname’ ) ) :
printf( __( ‘競技場別アーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘stadiumname’ )->name );

elseif ( is_tax( ‘links-cat’ ) ) :
printf( __( ‘リンクスアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘links-cat’ )->name );

elseif ( is_tax( ‘catalogue-cat’ ) ) :
printf( __( ‘カタログアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘catalogue-cat’ )->name );

elseif ( is_tax( ‘addressbook_cat’ ) ) :
printf( __( ‘アドレスブックアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘addressbook_cat’ )->name );

else :
_e( ‘Archives’, ‘twentyfourteen’ );

endif;
?>

[/php]


【404ページ】

404ページは、子テーマ内にあるので、特に変更しない。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です