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

TwentyForteenがアップデートした。

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

使用テーマ:TwentyFourteen 1.7


TwentyFourteen 1.7本体

【抜粋表示の設定】

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


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


【サムネイルの表示方法を変更する】
既存の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, ‘catalogue-cat’, ‘

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

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

五十音順:‘, ”, ‘

‘ ); ?>
[/php]


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

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

| Copyright © 1996-2016 CONSA DE CONSA

を書き足す。


【コンサペディア】

(CSリンクス)


【子テーマ】

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

【パンくずリスト】

加工するのは、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]
/*
Theme Name: Child24
Template: twentyfourteen
*/

@import url(‘../twentyfourteen/style.css’);

/* title css改造分追加改変*/
.subtitle01 {
border-left: 15px solid #b22222;
padding: .6em .8em;
font-weight: bold;
}

.subtitle02 {
border-left: 30px solid #b22222;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding: .6em .8em;
}

.subtitle02b {
display: block;
padding-top: .2em;
font-size: .8em;
color: #ccc;
}

.subtitle03 {
border-left: 15px solid #b22222;
border-bottom: 1px solid #ccc;
border-top: 1px solid #ccc;
padding: .6em .8em;
}

.subtitle04 {
border-left: 15px solid #99c;
padding: .6em .8em;
}

.cssaijiki {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #000;
font-size: 1.143em;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.cssaijikititle2 {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #333;
background: #333;
color: #fff;
font-size: 1.143em;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.cssaijikititle3 {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #99c;
font-size: 1.143em;
font-weight: bold;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.cssaijikititle {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #99c;
font-size: 1.143em;
font-weight: bold;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.csclonicle {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #000;
font-size: 1.143em;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.csclonicletitle {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #B92A2C;
font-size: 1.143em;
font-weight: bold;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.syllabarytitle2 {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #333;
background: #333;
color: #fff;
font-size: 1.143em;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.syllabarytitle3 {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #B92A2C;
font-size: 1.143em;
font-weight: bold;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.categorylist {
border-left: 20px solid #b22222;
border-right: 20px solid #b22222;
border-top: 1px dotted #ccc;
border-bottom: 1px dotted #ccc;
padding: .6em .8em;
}

.categorylisttitle {
border-left: 15px solid #b22222;
padding: .6em .8em;
}

.lexicon-eyecatch {
float: right;
margin-right: 15px;
margin-left: 15px;
margin-bottom: 10px;
}

.players-subtitle2 {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #B92A2C;
font-size: 1.143em;
font-weight: bold;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.players-subtitle3 {
border-left: 15px solid #b22222;
padding: .6em .8em;
}

.annual-subtitle2 {
position: relative;
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #333;
background: #333;
color: #fff;
font-size: 1.143em;
font-weight: bold;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.annual-subtitle3 {
margin: 0 0 1.5em;
padding: 0.8em;
border: 2px solid #333;
font-size: 1.143em;
font-weight: bold;
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}

.lexicon-subtitle2 {
margin: 0 0 1.5em;
padding: 0.4em;
border-bottom: 1px solid #999;
font-size: 1.143em;
font-weight: bold;
}

.lexicon-subtitle3 {
margin: 0 0 1.5em;
padding: 0.4em;
border-bottom: 1px dotted #999;
font-size: 1.143em;
font-weight: bold;
}

/*
fullwidthtemplate
*/

.page-template-page-templatesreal-full-width-php .site {
width: 100%;
}

.page-template-page-templatesreal-full-width-php .hentry {
margin: 0 auto 48px;
max-width: 90%;
}

.page-template-page-templatesreal-full-width-php .site-content .entry-header,
.page-template-page-templatesreal-full-width-php .site-content .entry-content,
.page-template-page-templatesreal-full-width-php .site-content .entry-summary,
.page-template-page-templatesreal-full-width-php .site-content .entry-meta,
.page-template-page-templatesreal-full-width-php .page-content {
margin: 0 auto;
max-width: 90%;
}

.page-template-page-templatesreal-full-width-php .main-content,
.page-template-page-templatesreal-full-width-php .content-area {
float: left;
width: 100%;
}
.page-template-page-templatesreal-full-width-php .site-content,
.page-template-page-templatesreal-full-width-php .site-main .widecolumn {
margin-left: 0;
}

.page-template-page-templatesreal-full-width-php .site:before {
width: 0;
}

.page-template-page-templatesreal-full-width-php .site-content {
margin-left: 0;
margin-right: 0;
}

/*
bladcramb
*/

div.breadcrumbs {
margin-left: 48px;
padding:5px 0 0 10px;
}

/*
List Style Widgets (GCE and Oldpost and WPP)
*/

.widget_gce_widget li,
.widget_oldpost_widget li,
.popular-posts li {
border-top: 1px solid rgba(255, 255, 255, 0.2);
padding: 8px 0 9px;
}

.widget_gce_widget li:first-child,
.widget_oldpost_widget li:first-child,
.popular-posts li:first-child {
border-top: 0;
}

.content-sidebar .widget_gce_widget li,
.content-sidebar .widget_oldpost_widget li,
.content-sidebar .popular-posts li {
border-color: rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 1008px) {

.primary-sidebar .widget_gce_widget li,
.primary-sidebar .widget_oldpost_widget li,
.primary-sidebar .popular-posts li {
border-top: 0;
padding: 0 0 6px;
}

.primary-sidebar .widget_gce_widget li:last-child,
.primary-sidebar .widget_oldpost_widget li:last-child,
.primary-sidebar .popular-posts li:last-child {
padding: 0;
}

}

/* Hr tag */

hr.style-players {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-players:after {
content: “CSプレイヤーズ|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-annual {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-annual:after {
content: “CSアニュアル|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-lexicon {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-lexicon:after {
content: “CSレキシコン|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-links {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-links:after {
content: “CSリンクス|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-knowledgebase {
border-top: 5px double #fff;
text-align: right;
margin : 15px 0px 30px 0px ;
}

hr.style-knowledgebase:after {
content: “コンサQ and A|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-consaguide {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-consaguide:after {
content: “コンサガイド|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-consapedia {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-consapedia:after {
content: “コンサペディア|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-cschronicle {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-cschronicle:after {
content: “CSクロニクル|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-csalmanac {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-csalmanac:after {
content: “CSアルマナック|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-csconcierge {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-csconcierge:after {
content: “コンサシェルジュ|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

hr.style-consanote {
border-top: 5px double #fff;
text-align: right;
margin : 100px 0px 30px 0px ;
}

hr.style-consanote:after {
content: “コンサノート|CONSA DE CONSA”;
display: inline-block;
position: relative;
top: -1.2em;
right: 2.2em;
font-size: 0.8em;
padding: 0 0.5em;
background: white;
}

/* 中央揃え */

.site {
margin: 0 auto;
}

[/php]

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

[php]

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( ‘knowledgebase-cat’ ) ) :
printf( __( ‘Q&Aアーカイブ: %s’, ‘twentyfourteen’ ), get_term_by( ‘slug’, get_query_var( ‘term’ ), ‘knowledgebase-cat’ )->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 );

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

endif;
?>


[/php]


【404ページ】

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

コメントを残す

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