初心者必見 brank front テンプレート

このテンプレートは、テンプレートの書き換えなどを行わずに、表示を変更するためのテンプレートです。

インスタントインストールしたテーマ等で、FTPを使ってテーマのカスタマイズが出来ない人でも、自分の考えたイメージのページを作成する事が出来ます。

まず、固定ページを作成していただき、トップページに表示する設定を行ってください。

固定ページ名が表示されたトップページが表示されたら、管理画面のメニューから、外観・テーマの編集を開いてください。

右側のファイルリストの中から、brank front 固定ページテンプレートをクリックしてください。

以下のように書かれたテンプレートが表示された事を確認してください。



お試しに、以下の記述を見つけてください

/**
 * Display or not Site title
 *
 * value y then show other hide.
 *
 *
 */
		$raindrops_display_title = 'y';
'y'と設定されている値を、''に変更してトップページを表示してみてください。

サイトのタイトルが非表示になっている事が確認できると思います。

/**
 * Display or not Site description
 *
 * value y then show other hide.
 *
 *
 */
		$raindrops_display_description = 'y';
'y'と設定されている値を、''に変更してトップページを表示してみてください。

サイトの概要(タグライン)が非表示になっている事が確認できると思います。

もし、画像の上に表示されている場合は、カスタマイズの、「ヘッダーテキストを表示する」のチェックをはずしてください。

/**
 * Display or not Site header image
 *
 * value y then show other hide.
 *
 *
 */
		$raindrops_display_header_image            = 'y';
'y'と設定されている値を、''に変更してトップページを表示してみてください。

ヘッダー画像が非表示になっている事が確認できると思います。

/**
 * Display or not horizontal navigation
 *
 * value y then show other hide.
 *
 *
 */
		$raindrops_display_nav_menus                = 'y';

'y'と設定されている値を、''に変更してトップページを表示してみてください。

メインメニューが非表示になっている事が確認できると思います。

/**
 * Display or not widget
 *
 * value y then show other hide.
 */
		$raindrops_display_widget = 'y';
'y'と設定されている値を、''に変更してトップページを表示してみてください。

Widgetを使っていれば非表示になっている事が確認できると思います。

もし、サイドバーが非表示になっていなくとも、取りあえず進めていきましょう。

/**
 * Add your html , line:211 $custom_text_extra_sidebar
 *
 * value y then show other hide.
 *
 */
		$raindrops_add_custom_text_extra_sidebar    = '';
''と設定されている値を、'y'に変更してトップページを表示してみてください。

エクストラサイドバーにhello world と表示されていると思います。

このhello worldの文字は、以下の部分に記述されたものです。

/**
 * substitution extra sidebar content
 *
 */

		$custom_text_extra_sidebar= <<hello world

SUBSTITUTION_EXTRA_SIDEBAR;

このhello worldの文字やタグは、自由に書き換える事が出来ます。

注意 SUBSTITUTION_EXTRA_SIDEBAR; は行の先頭に必ずなければなりませんので、これらには、絶対に変更を加えないでください。

/**
 * Add your html , line:194 $custom_text_default_sidebar
 *
 * value y then show other hide.
 *
 */
		$raindrops_add_custom_text_default_sidebar = '';
''と設定されている値を、'y'に変更してトップページを表示してみてください。

デフォルトイドバーにhello world と表示されていると思います。

このhello worldの文字は、以下の部分に記述されたものです。

/**
 * custom_text_default_sidebar
 *
 *
 *
 */

		$custom_text_default_sidebar= <<hello world

SUBSTITUTION_CONTENT;

エクストラサイドバーと同様に、変更が出来ます。

ここで、いったん

/**
 * Add your html , line:211 $custom_text_extra_sidebar
 *
 * value y then show other hide.
 *
 */
		$raindrops_add_custom_text_extra_sidebar = '';
/**
 * Add your html , line:194 $custom_text_default_sidebar
 *
 * value y then show other hide.
 *
 */
		$raindrops_add_custom_text_default_sidebar = '';

先ほど'y'にした値を、''に戻しておきます。

続いて

/**
 * When you not need left margin ( blank default sidebar width ).
 *
 * value y then show other hide.
 *
 */
		$raindrops_remove_left_margin = 'y';
''と設定されている値を、'y'に変更してトップページを表示してみてください。

左サイドバーのマージンがなくなっていることをご確認ください

/**
 * When you not need right margin ( blank extra sidebar width ).
 *
 * value y then show other hide.
 *
 */

		$raindrops_remove_right_margin = 'y';
''と設定されている値を、'y'に変更してトップページを表示してみてください。

右サイドバーのマージンがなくなっていることをご確認ください

/**
 * Display or not page title
 * value y then show other hide.
 *
 */
		$raindrops_display_page_title = 'y';

		$raindrops_display_page_content= 'y';
'y'と設定されている値を、''に変更してトップページを表示してみてください。

固定ページテンプレートのタイトルと本文が消えた事を確認してください。

これで、すべてが消えてしまいました。

次に、表示する設定を行っていきたいと思います。

ページの最初のほうにあるいかの設定を見つけてください

/**
 * When you display the Sticky post, $show_sticky_post set value true.
 *
 *
 *
 */
		$show_sticky_post 		= false;
		
		$raindrops_sticky_post_args= array( 'posts_per_page'=> 3,
												'post__in'  => get_option( 'sticky_posts' ),
												//'ignore_sticky_posts'=> 1
											);
$show_sticky_post 		= false;
falsetrueに変更してみます。

もし、あなたの投稿の中に、スティッキーポストがあれば(投稿の公開状態のところにある「先頭に固定表示」という項目がチェックされた項目があれば、投稿が表示されると思います。

/**
 * When you display links list of the Recent Posts , please delete comment out of add_action( ).
 *
 *
 *
 */
//position
//add_action('raindrops_append_entry_content','raindrops_recent_posts' );
//config
		$raindrops_recent_posts_setting= array( 'title'=> esc_html__( 'Recent posts', 'Raindrops' ),
												'numberposts'=> 5 //show count
												);

を、見つけてください

//add_action('raindrops_append_entry_content','raindrops_recent_posts' );

この、コメントアウトされた行を以下のように変更してみます

add_action('raindrops_append_entry_content','raindrops_recent_posts' );

正常であれば、最近の投稿のリンクが表示されていると思います。

/**
 * When you display the tagged entry list , please delete comment out of add_action( ).
 *
 *
 *
 *
 */
//position
//add_action('raindrops_append_entry_content','raindrops_tag_posts' );
//config
		$raindrops_tag_posts_setting= array('title'=> esc_html__( 'Tags', 'Raindrops' ),
                                    'numberposts'=> 5 ,     //show count
                                    'tax_query'=> array(
                                                array(
                                                    'taxonomy'=>'post_tag',
                                                    'terms'=> array( 'post-formats' ) ,//tag slug
                                                    'field'=>'slug',
                                                    'operator'=>'IN'
                                                    ),
                                                'relation'=> 'AND'
                                                )
                                    );

前と同様に

//add_action('raindrops_append_entry_content','raindrops_tag_posts' );

を以下のように変更します

add_action('raindrops_append_entry_content','raindrops_tag_posts' );

正常であれば、投稿フォーマットのリンクが出来ていると思います。

さて、このテンプレートに関しては、これで、おしまいです。

いろいろ、変更してみてください。

ところで、このようにテンプレートに様々な変更を加えてしまって、最初の状態に戻したいという事が、多分必ずあると思いますので、テーマの編集から、テーマをインストールしたばかりの状態に戻す

必殺技を、伝授して説明を終わりたいと思います。

テーマの編集で、スタイルシート(style.css)を選択します。

以下のコメント欄が表示されます

/* 
Theme Name: raindrops
Theme URI: https://www.tenman.info/wp3/raindrops/
Description: This theme file has the automatic arrangement of color function in specifying the layout customizing function and the reference color by Yahoo User Interface. The color can specify the tradition color and the American tradition color of Japan by the name. An automatic arrangement of color and the layout can be changed to the expression who you further seem by your instruction. ver1.111 Retina support and support Post Formats all types.
Author: Tenman
Author URI: https://www.tenman.info/wp3/
Version: 1.120
Tags:black, blue, gray, brown, green, orange, pink, purple, red, silver, tan, white, yellow,dark,light,one-column,two-columns,three-columns,four-columns,left-sidebar,right-sidebar ,fixed-width ,flexible-width, custom-colors, custom-header, custom-background, custom-menu, editor-style, theme-options, threaded-comments, sticky-post, translation-ready, post-formats, featured-images, full-width-template
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
 */
Version: 1.120

このバージョンを古いものに書き換えます
コロンの後には、必ず半角スペースを付けてください。

Version: 1.000

保存して、しばらくすると、Raindropsテーマのアップデートができます。
というメッセージが表示されるので、アップデートして元に戻す事が出来ます。

長い文章を、諦めずに読んでくれてありがとう