• このエントリーをはてなブックマークに追加

関連記事

(日本語) Twenty Fourteenカスタマイズ用プラグインと派生テーマ

Sorry, this entry is only available in 日本語.

(日本語) Twenty Fourteen 「投稿日」や"先頭固定表示"を非表示

Sorry, this entry is only available in 日本語.

(日本語) jQueryをCDNから読み込む

Sorry, this entry is only available in 日本語.

(日本語) 投稿タイトルのtitle属性を削除など Twenty Twelve 1.2での変更点

Sorry, this entry is only available in 日本語.

Twenty Twelve | How to change "Proudly powered by WordPress" for Copyright*

Twenty Twelve in 1.1 This post explains how to change the strings "Proudly ~" in footer element. J

(日本語) Twenty Thirteen テーマ用フォント "Source Sans Pro" / "Bitter"の使用を止

Sorry, this entry is only available in 日本語.

(日本語) テーマ ブックマーク 2013

Sorry, this entry is only available in 日本語.

(日本語) ie.cssの子テーマ化など Twenty Twelve 1.1での変更点

Sorry, this entry is only available in 日本語.

(日本語) 「All in One SEO Pack」を代替するための準備

Sorry, this entry is only available in 日本語.

(日本語) Twenty Fourteen "コメントをどうぞ"の非表示と変更方法

Sorry, this entry is only available in 日本語.

Comment

  1. "Contact Form 7

    Contact Form 7 バージョン:3.3.2

    「Contact Form 7」は”お問い合わせ”ページによく使用されているプラグインだと思いますが、標準で以下の3つのCSSやJSが読み込まれるはずです。

    plugins/contact-form-7/includes/css/styles.css
    plugins/contact-form-7/includes/js/jquery.form.min.js
    plugins/contact-form-7/includes/js/scripts.js

    これらは、プラグイン機能を使用しないページ、例えば投稿ページ単体などでも読み込まれてしまいます。(投稿ページにもフォームを設けている場合は、該当しません。)これはプラグイン側が自分がこのページで使われるかどうか判断できないため、すべてのページで読み込まれるようになっています。余計ですよね。
    以下のコードをfunctions.phpに追加することで、必要なページのみで読み込ませるようにすることができます。
    下の例では、/contactページのみに適用していますが、複数ある場合は、if内にurlをorで追加して下さい。
    1
    2
    3
    4
    5
    6

    remove_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' )

Leave a Reply to @FreelanceWP Cancel reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    PAGE TOP ↑