はじめに確認する
- ワードプレスがインストールされているか確認する
- 「Cocoon Child」「Cocoon」がインストールされているか確認する
- httpsでアクセスできるかどうか確認する
httpsにする
- 設定→一般→「WordPress アドレス (URL)」→httpsにする
- 設定→一般→「サイトアドレス (URL)」→httpsにする
プラグインのインストールと有効化
- 【インストール】Contact Form 7(作者: Takayuki Miyoshi)
- 【インストール(↓と検討)】Flamingo(作者: Takayuki Miyoshi)
- 【インストール(保留)】Contact Form CFDB7(作者: Arshid)
- 【インストール】zipaddr-jp(作者: Tatsuro, Terunuma)※参考サイト
- 【インストール】insert pages(作者: Paul Ryan)
- 【インストール】EWWW Image Optimizer(作者: Exactly WWW)
- 【インストール】Flexible Table Block(作者: Aki Hamano)
- 【インストール】LIQUID BLOCKS(作者: LIQUID DESIGN Ltd.)
- 【インストール】Google XML Sitemaps(作者: Auctollo)エラーがある
- 【プリインストール有効化】Site Kit by Google(ログイン必要)
- 【プリインストール有効化】Akismet Anti-spam: Spam Protection
- 【プリインストール有効化】SiteGuard WP Plugin
- 【プリインストール有効化】WP Multibyte Patch
- 【削除】Hello Dolly
- 【インストール検討】Header Footer Code Manager(99robots)
- 【インストール検討】Elementor Website Builder – More than Just a Page Builder(Elementor.com)
- 【必要に応じて、インストール】Duplicator(Duplicator)サイトコピー
- 【必要に応じて、インストール】Advanced Custom Fields(WP Engine)カスタムフィールド
- 【必要に応じて、インストール】Custom Post Type UI(WebDevStudios)カスタム投稿
- 【必要に応じて、インストール】Yoast Duplicate Post(Enrico Battocchi & Team Yoast)ページコピー
- 【必要に応じて、インストール】Honeypot for Contact Form 7(Saad Iqbal)
- 【必要に応じて、インストール】WP Armour(Dnesscarkey)
ワードプレス設定
- 表示設定>ホームページ:固定ページ(トップ・top)設定
- 表示設定>投稿ページ:固定ページ(コラム・column)設定
- ディスカッション>新しい投稿へのコメントを許可をOFF
Cocoon 設定
- 全体→フォント→指定なし
- 全体→サイト背景色→白にする
- 全体→サイドバーの位置→左(右がデフォルト)
- 全体→サイドバーの表示状態→フロントページで非表示
- ヘッダー→ヘッダーレイアウト→トップメニュー右寄せ(前はセンターロゴスリムメニュー)
- ヘッダー→ヘッダーの固定にチェック
- ヘッダー→高さ→空にする
- ヘッダー→高さ(モバイル)→空にする
- ヘッダー→グローバルナビメニュー色→オフィシャルカラー(決まってなかったら#0071A1)
- タイトル→フロントページタイトル→サイト名 | キャッチフレーズ
- SEO→日付の設定→表示する日付→更新日のみ
- インデックス→投稿関連情報の表示→投稿日の表示(スニペット=サムネイル)(×投稿日〇更新日)
- 投稿→カテゴリー→同一カテゴリーのものを表示するにチェック
- 投稿→コメント設定→チェックを外す(コメントを表示しない)
- 投稿→パンくずリスト設定→パンくずリストの配置→メインカラムトップ
- 投稿→パンくずリスト設定→パンくずリストに記事タイトルを含める(チェック)
- 固定→パンくずリスト設定→パンくずリストの配置→メインカラムトップ
- 固定→パンくずリスト設定→パンくずリストに記事タイトルを含める(チェック)
- 本文→投稿関連情報→更新日の表示のみにチェック(投稿日の表示×投稿日〇更新日×投稿者名)(スニペット=サムネイル)
- 目次→目次表示の深さ→h2見出しまで
- 目次→目次の中央表示→チェックがついていればOK(目次をメインカラムの中央に表示する)
- SNSシェア→トップシェアボタンの表示をオフ
- SNSシェア→ボトムシェアボタンの表示をオフ
- SNSフォロー→フォローボタンの表示をオフ
- フッター→フッター背景色→オフィシャルカラーに設定(決まってなかったら#0071A1)
- フッター→フッター文字色→白色に設定
- フッター→フッター表示タイプ→メニュー&クレジット(中央揃え)
- ボタン→ボタン色→オフィシャルカラーに設定(決まってなかったら#0071A1)
- モバイル→モバイルボタン→モバイルボタンの固定表示にチェック
- その他→簡単SSL対応→内部URLをSSL対応(簡易版)にチェック
Cocoon設定 > アクセス集計
- アクセス集計の有効化(チェックを外す)
Cocoon設定 >高速化
- ブラウザキャッシュの有効化(チェックを付ける)
- CSSを縮小化する(チェックを付ける)
- JavaScriptを縮小化する(チェックを付ける)
- Lazy Loadを有効にする(チェックを付ける)
- Googleフォントの非同期読み込みを有効にする(チェックを付ける)
画像設定関連(デザイン校了後)
ファビコン
- 外観→カスタマイズ→サイト基本情報→サイトアイコンを選択
- 画像サイズ(512 px × 512 px)
OGPの設定
- cocoon設定→OGPの設定→画像アップロード
- 画像サイズ(800 px × 660 px)
NO IMAGE画像の設定
- cocoon設定→NO IMAGE画像→画像アップロード
- 画像サイズ(1200 px × 675 px)
ロゴ
- cocoon設定→ヘッダー→ヘッダーロゴ→画像アップロード
グーグル広告の画像
グーグル広告の画像サイズを調べて、上記の画像やアイキャッチの画像サイズを調整する。
ロゴのサイズは、750px:188px を作成し、同時に750px:750pxも作っておけば、グーグル広告にリサイズせずに使える
トップのファーストビュー画像は、パソコン版の(1910px:1000px)スマホ版(750px:750px)ならグーグル広告にリサイズせずに使える
ここまでやればデザイン作成開始できる
オススメ画像サイズ
スマホ版ファーストビュー・全体
横:360px〜1080px 、縦:600px (レティーナディスプレイを考慮し2倍にして横750pxで作成)
画面横縦サイズ | 750x1334 |
メインに使う大きめの画像 | 750x550 |
2カラムに使う小さ目の画像 | 750x550 |
パソコン版(ファーストビュー・全体)
画面横縦サイズ | 1920x1080 |
メインに使う大きめの画像 | 1080x550 |
2カラムに使う小さ目の画像 | 540×350 |
記事のアイキャッチ画像
パソコン版800px(圧縮形式はwebp)
比率 | 16:9 |
きれい | 1200x675 |
普通 | 800x450 |
グーグル広告の画像サイズ
画像(横長) | 1.91:1 |
画像(正方形) | 1:1 |
画像(縦長) | 9:16 |
ロゴ(正方形) | 1:1 |
ロゴ(横長) | 4:1 |
結局のところ、画像サイズは?
グーグル広告を出す可能性があるのであれば、サイト内で使っている画像サイズとグーグル広告で使える画像サイズが一致していれば、再度作成する手間が省けるということになる。
サイト幅が横幅いっぱいのパソコン版 | 1910px:1000px(1.91:1) |
メインカラムいっぱいのパソコン版 | 955px:500px(1.91:1) |
サイト幅が横幅いっぱいのスマホ版 | 750px:750px(1:1) |
ロゴ(正方形) | 750px:750px(1:1) |
ロゴ(横長) | 750px:188px(4:1) |
以下、コンテンツ作成中に設定すればいいもの
コンタクトフォーム設定
- コンタクトフォーム>作成
<div class="table">
<div class="tr">
<div class="td">
<label> <b>氏名</b><u class="hissu">必須</u></label>
</div>
<div class="td">
[text* your_name]
</div>
</div>
<div class="tr">
<div class="td">
<label> <b>氏名フリガナ</b><u class="hissu">必須</u></label>
</div>
<div class="td">
[text* your_name_furigana]
</div>
</div>
<div class="tr">
<div class="td">
<label> <b>住所</b><u class="nini">任意</u> </label>
</div>
<div class="td">郵便番号(7桁半角数字ハイフンなし)<br>[text zip]<br>住所<br>[text pref] [text city] [text addr]<br>[text addr2]</div></div>
<div class="tr">
<div class="td">
<label> <b>電話番号</b><u class="hissu">必須</u></label>
</div>
<div class="td">
[tel* your_denwa]
</div>
</div>
<div class="tr">
<div class="td">
<label> <b>メールアドレス</b><u class="hissu">必須</u></label>
</div>
<div class="td">
[email* your_email]
</div>
</div>
<div class="tr">
<div class="td">
<label> <b>お問い合わせに対する<br>ご希望の連絡方法</b><u class="hissu">必須</u></label>
</div>
<div class="td">
[radio your_renraku use_label_element default:1 "電話にて" "メールにて"]
電話にてご連絡する場合の希望時間<br>(例:いつでも、平日午前中、○日18:00以降など)
[text your_renrakujikan]
</div>
</div>
<div class="tr">
<div class="td">
<label> <b>お問い合せ内容</b><u class="hissu">必須</u></label>
</div>
<div class="td">
[textarea* your_naiyou]
</div>
</div>
</div>
<br>
[submit "送信する"]
お問い合わせがありました。
対応お願いいたします。
■氏名
[your_name]
■氏名フリガナ
[your_name_furigana]
■郵便番号
[zip]
■住所
[pref][city][addr]
[addr2]
■電話番号
[your_denwa]
■メールアドレス
[your_email]
■お問い合わせに対するご希望の連絡方法
[your_renraku]
■電話にてご連絡する場合の希望時間
(例:いつでも、平日午前中、○日18:00以降など)
[your_renrakujikan]
■お問い合せ内容
[your_naiyou]
--
送信元ページ:[_post_title]
送信元URL:[_post_url]
このメールは [_site_title] ([_site_url]) のお問い合わせフォームから送信されました
/************************************
** フォームのデザイン
************************************/
form u.hissu {
font-size:10px;
text-decoration:none;
display: inline-block;
margin: 0 1em 0 1em;
padding: .4em;
line-height: 1;
text-decoration: none;
color: #fff;
background-color: #bf0000;
border: 1px solid #bf0000;
}
form u.nini {
font-size:10px;
text-decoration:none;
display: inline-block;
margin: 0 1em 0 1em;
padding: .4em;
line-height: 1;
text-decoration: none;
color: #fff;
background-color: #999;
border: 1px solid #999;
}
form u.kotei {
font-size:10px;
text-decoration:none;
display: inline-block;
margin: 0 1em 0 1em;
padding: .4em;
line-height: 1;
text-decoration: none;
color: #fff;
background-color: #333;
border: 1px solid #333;
}
/* チェック・ラジオを一行ごとに */
.wpcf7-form-control .wpcf7-list-item{
display:block;
}
/* 禁止マーク */
input:disabled {
cursor: not-allowed;
}
label.disabled {
cursor: not-allowed;color:#999;
}
/* 郵便番号 */
input[name="your_date"]{width:40%;}
input[name="your_name"]{width:40%;}
input[name="your_name_furigana"]{width:50%;}
input[name="your_denwa"]{width:50%;}
input[name="your_email"]{width:60%;}
input[name="zip"]{width:30%;}
input[name="pref"]{width:30%;}
input[name="city"]{width:30%;}
input[name="addr"]{width:30%;}
input[name="addr2"]{width:100%;}
select[name="your_todohuken"]{width:60%;}
@media screen and (max-width: 1023px){
input[name="your_date"]{width:70%;}
input[name="your_name"]{width:70%;}
input[name="your_name_furigana"]{width:70%;}
input[name="your_denwa"]{width:80%;}
input[name="your_email"]{width:90%;}
input[name="zip"]{width:60%;}
input[name="pref"]{width:60%;}
input[name="city"]{width:60%;}
input[name="addr"]{width:90%;}
input[name="addr2"]{width:100%;}
select[name="your_todohuken"]{width:60%;}
}
input[name="your_gosyoukai_name"]{width:40%;}
@media screen and (max-width: 1023px){input[name="your_gosyoukai_name"]{width:70%;}}
input[name="your_gosyoukai_tanto"]{width:40%;}
@media screen and (max-width: 1023px){input[name="your_gosyoukai_tanto"]{width:70%;}}
input[name="your_gosyoukai_denwa"]{width:50%;}
@media screen and (max-width: 1023px){input[name="your_gosyoukai_denwa"]{width:80%;}}
input[name="your_gosyoukai_email"]{width:60%;}
@media screen and (max-width: 1023px){input[name="your_gosyoukai_email"]{width:90%;}}
/* フォームオブジェクト */
input[type="submit"] {
display:block;
background-color: #B00000;
color:#fff;
font-weight:bold;
text-align:center;
margin: 1rem auto 0 auto;
width: 60%;
font-size:1em;
}
input {border: 1px solid #808080 !important;margin:4px 0;}
textarea {border: 1px solid #808080 !important;margin:2px 0;}
input:focus {background-color: #e0ffff;border: 1px solid #000 !important;}
textarea:focus {background-color: #e0ffff;border: 1px solid #000 !important;}
input:focus[type="submit"] {background-color: #0000ff;}
/************************************
** テーブルのデザイン
************************************/
.table{
font-size:0.9em;
display:table;
border-collapse: collapse;
border-spacing: 0;
margin: 0 !important;
}
.table .tr{
width: 100%;
display:table-row;
border: 1px solid #aaa;
border-collapse: collapse;
border-spacing: 0;
}
@media screen and (max-width: 767px) {
.table .tr{
display: block;
width:100%;
}
}
.table .tr .td{
display: table-cell;
border-left: 1px solid #aaa;
border-right: 1px solid #aaa;
padding: 8px 13px;
vertical-align: middle;
border-collapse: collapse;
border-spacing: 0;
}
@media screen and (max-width: 767px) {
.table .tr .td{
display: block;
width:100%;
}
}
.table .label{
background : #fcfcfc;
width:30%;
}
.table .input{
width:70%;
}
.table .tr .td:nth-child(2){
width:65%;
}
@media screen and (max-width: 767px) {
.table .tr .td:nth-child(2){
display: block;
width:100%;
}
}
.tr_midashi{
background:#eee;
color:#333;
font-weight:bold;
}
- 送信先→[_site_admin_email]
- 送信元→[_site_title]
- 題名→[_site_title]お問い合わせ
- 追加ヘッダー→空にする
コンバージョンが取れない、サンクスページに遷移しない
▼固定ページでサンクスページ作成
▼コンタクトフォームの送信の後ろにスクリプトを入れる
script>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
location = ‘/thanks/’;
}, false );
/script>
▼サンクスページにコンバージョンタグをいれた
グーグル広告から吐き出されるもの
▼safariのみスマホから送信できないのでfunctions.phpに以下を追記
add_filter( ‘wpcf7_load_js’, ‘__return_false’ ); add_filter( ‘wpcf7_support_html5_fallback’, ‘__return_true’ );
▼reCAPTCHA をv3に変更した
・送信できるようにはなった
▼サファリでサンクスページに飛ばない
お問い合わせの受付が完了しました。
この度は、お問い合わせいただき、誠にありがとうございます。
ご希望の連絡方法にてご連絡させていただきます。
メールにてご連絡をご希望され、しばらく経っても当事務所からメールが届かない場合は、迷惑メールフォルダに振り分けられていないかをご確認ください。
ご相談やご不明点についてお電話でもお受けしております。
プラグイン設定
- Site Kit by Google(Search Consoleで、sitemap.xml を設定)
メニューの作成(外観>メニュー)
PCメニュー(ヘッダーメニュー)
- ホーム
- 当事務所について
- 事業案内
- 料金表
- 事務所案内
- アクセス
- ブログ
- お問い合わせ
SPメニュー(フッターモバイルボタン)
URL | #menu |
ナビゲーションラベル | 業務内容 |
CSS class (オプション) | fa fa-angle-double-right |
URL | tel:09012341234 |
ナビゲーションラベル | お電話お待ちしております |
CSS class (オプション) | fa fa-phone |
function.php
//ログイン時間を長くする
add_filter( 'auth_cookie_expiration', 'my_auth_cookie_expiration' );
function my_auth_cookie_expiration() {
return 60*60*24*365;
}