忍者ブログ
20 April

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

01 August

WP4.5.2で今までのスムーススクロールが効かなくなる

http://moralhazard.jp/2016/03/25/wp-error-jquery112/
https://xakuro.com/blog/javascript/321


これをコピペする
アコーディオンパネルやタブ等の、ページ内リンクとのバッティグも防いでると思う
ありがたい!!

<script type="text/javascript">
(function($){
 
jQuery(function() {
jQuery('a[href^="#"]:not([href$="#"])').click(function() {
var href = $(this).attr('href');
var pos = $(href).offset().top;
var duration = 200;
jQuery('body, html').animate({ scrollTop: pos }, duration, 'swing');
return false;
});
});
 
})(jQuery);
</script>
PR
06 October

cf7 LPコピペ用コード

<table class="cf7">
  <tr>
    <th>社名</th>
    <td>[text your-company] </td>
  </tr>
  <tr>
    <th>担当者名</th>
    <td>[text your-name akismet:author class:small] </td>
  </tr>
  <tr>
    <th>業種</th>
    <td>[text your-gyoushu class:small] </td>
  </tr>
  <tr>
    <th>売上高</th>
    <td>[text your-uriage class:small] 万円</td>
  </tr>
  <tr>
    <th>郵便番号<span class="req">*</span></th>
    <td>[text* zip id:zip class:small] </td>
  </tr>
  <tr>
    <th>都道府県<span class="req">*</span></th>
    <td>[select* pref id:pref include_blank "北海道" "青森県" "岩手県" "宮城県" "秋田県" "山形県" "福島県" "茨城県" "栃木県" "群馬県" "埼玉県" "千葉県" "東京都" "神奈川県" "新潟県" "富山県" "石川県" "福井県" "山梨県" "長野県" "岐阜県" "静岡県" "愛知県" "三重県" "滋賀県" "京都府" "大阪府" "兵庫県" "奈良県" "和歌山県" "鳥取県" "島根県" "岡山県" "広島県" "山口県" "徳島県" "香川県" "愛媛県" "高知県" "福岡県" "佐賀県" "長崎県" "熊本県" "大分県" "宮崎県" "鹿児島県" "沖縄県"]</td>
  </tr>
  <tr>
    <th>市町村区・番地等<span class="req">*</span></th>
    <td class="address-100">[text* addr id:addr]</td>
  </tr>
  <tr>
    <th>お電話番号<span class="req">*</span></th>
    <td>[tel* tel-17 class:small]</td>
  </tr>
  <tr>
    <th>日中連絡先</th>
    <td>[tel tel-noon class:small]<br>日中連絡の付きやすい携帯電話番号などをご記入ください。</td>
  </tr>
  <tr>
    <th>FAX番号</th>
    <td>[tel tel-fax class:small]</td>
  </tr>
    <tr>
    <th>メールアドレス<span class="req">*</span></th>
    <td>[email* your-email akismet:author_email class:small]</td>
  </tr>
  <tr>
    <th>ご希望</th>
    <td>[checkbox checkbox-572 use_label_element "無料見積もり" "無料現地相談" "無料点検" "無料相談" "その他"]
</td>
  </tr>
 
  <tr>
    <th>お急ぎのお客様</th>
    <td>[checkbox checkbox-busy use_label_element "お急ぎのお客様はこちらにチェックを入れて下さい。"]
</td>
  </tr>
 
 <tr>
    <th>備考欄</th>
    <td>[textarea textarea-690]
</td>
  </tr>
</table>
<div class="doui">[acceptance acceptance-419] 上記内容をご確認していただきチェックを入れてください [/acceptance]</div>
<p class="text-xs-center">[submit]</p>



社名:[your-company]
担当者名:[your-name]
業種:[your-gyoushu]
売上高:[your-uriage] 万円

郵便番号:[zip]
都道府県:[pref]
市町村区・番地等:[addr]
お電話番号:[tel-17]
日中連絡先:[tel-noon]
FAX番号:[tel-fax]
メールアドレス:[your-email]

お問い合わせ項目:[checkbox-572]
急ぎのお客様:[checkbox-busy]

ご相談内容:
[textarea-690]



<?php if(is_page('25')): ?>
<!-- ajaxzip 住所自動入力-->
<script src="https://ajaxzip3.github.io/ajaxzip3.js" charset="UTF-8"></script>
<script type="text/javascript">
jQuery(function(){
  jQuery('#zip').keyup(function(event){
    AjaxZip3.zip2addr(this,'','pref','addr');
  })
})
</script>
<?php endif; ?>


/* contact */
.wpcf7{
    border:none!important;
    background:none!important;
   
}
.cf7{
    max-width:900px;
    margin:0 auto!important;
}
.cf7 .small{
    max-width:300px;
}
.post_content th {
    background: #dcedff;
    vertical-align:middle;
    background:none;
   
   
}
.post_content th {
    background:#DCEDFF;

}
.post_content th {
    background:#DCEDFF;
    border: 1px solid #fff;
}
.post_content td, .post_content th {
        padding: 10px 15px 10px;

}

.post_content td {
        border: 1px solid #DCEDFF

}

/*.post_content tr {
    border-top:1px solid #DCEDFF;
    border-bottom:1px solid #DCEDFF;
}
*/
.req{
    font-weight:bold;
    color:red;
}

.wpcf7 textarea {
    height: 150px;
}

.wpcf7 input.wpcf7-submit{
     display:inline-block;
    width: 120px!important;
    background: #ffbb57;
    margin: 0 5px!important;
     height: auto;
    margin: 0 5px!important;
    border-radius:3px!important;
    color:#fff!important;
    letter-spacing:2px!important;
        height: 48px;
                vertical-align:top;

}

.text-xs-center{
    text-align:center;
}
.text-xs-center input[type="submit"], .text-xs-center input[type="reset"],.text-xs-center input[type="button"] {
    width: 120px!important;
    padding: 10px 15px!important;
    background: #ffbb57;
    margin: 0 5px!important;
    border:none!important;
    border-radius:3px!important;
    color:#fff!important;
    letter-spacing:2px!important;
        height: 48px;
        vertical-align:top;
}
.text-xs-center input[type="submit"]{
    display:inline-block;
        vertical-align:top;
}
.text-xs-center input[type="submit"]:hover, .text-xs-center input[type="reset"]:hover, .text-xs-center input[type="button"]:hover{
    opacity:0.8;
cursor:pointer;
}
.wpcf7 input.wpcf7-submit:hover {
    background-color: #ffbb57!important;
}
31 March

サイトヘルスを消す

ダッシュボード、ツールのサイトヘルスをけす
ダッシュボードのyoast SEOをけす
別に放置していても問題ないことばっかりなのにいちいちうるせーサイトヘルス
曖昧に警告ばっかしやがってこっちが面倒なんだよ
だから全て消す!!!


/*----------------------------------------------------------*/
//
// いらないものを消す
//
/*---------------------------------------------------------*/
add_action('wp_dashboard_setup', function() {
    global $wp_meta_boxes;
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health']);
});
add_action('admin_menu', function() {
    remove_submenu_page('tools.php', 'site-health.php');
});
add_action('wp_dashboard_setup', 'remove_wpseo_dashboard_overview' );
function remove_wpseo_dashboard_overview() {
  // In some cases, you may need to replace 'side' with 'normal' or 'advanced'.
  remove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'side' );
}
add_filter( 'site_status_should_suggest_persistent_object_cache', '__return_false' );
28 March

ダッシュボード他のサイトヘルスステータスを消す。あとダッシュボードのyoast

https://qiita.com/ki6ool/items/aaf191c37fa4a5011bbd

ありがたいコードをコピペ




add_action('wp_dashboard_setup', function() {
    global $wp_meta_boxes;
    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health']);
});
add_action('admin_menu', function() {
    remove_submenu_page('tools.php', 'site-health.php');
});
add_action('wp_dashboard_setup', 'remove_wpseo_dashboard_overview' );
function remove_wpseo_dashboard_overview() {
  // In some cases, you may need to replace 'side' with 'normal' or 'advanced'.
  remove_meta_box( 'wpseo-dashboard-overview', 'dashboard', 'side' );
}



どうでもいいし直らないしたいして有効でもないサイトヘルスステータス
ただちょっと注意文程度の内容のくせに重大なようにいってきやがって
これみてクライアントがガタガタ行ってくる場合があるのでもう非表示にすることにした
あまり客にたいして制限したりそういうの好きじゃないんだけど
さっとなおるような注意じゃないからめんどすぎ



09 July

google reCAPTCHAv3 cf7

https://accounts.google.com/ServiceLogin/signinchooser?passive=1209600&continue=https%3A%2F%2Fwww.google.com%2Frecaptcha%2Fadmin%3Fhl%3Dja&followup=https%3A%2F%2Fwww.google.com%2Frecaptcha%2Fadmin%3Fhl%3Dja&hl=ja&flowName=GlifWebSignIn&flowEntry=ServiceLogin

.grecaptcha-badge { visibility: hidden; }

<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
location = 'https://ドメイン/contact/thanks';
}, false );
</script>
<p style="text-align:center;color:#f4f4f4; font-size:12px;">This site is protected by reCAPTCHA and the Google <a style="color:#f4f4f4;" href="https://policies.google.com/privacy">Privacy Policy</a> and <a style="color:#f4f4f4;" href="https://policies.google.com/terms">Terms of Service</a> apply.</p>