質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
WordPress

WordPressは、PHPで開発されているオープンソースのブログソフトウェアです。データベース管理システムにはMySQLを用いています。フリーのブログソフトウェアの中では最も人気が高く、PHPとHTMLを使って簡単にテンプレートをカスタマイズすることができます。

Q&A

解決済

1回答

1259閲覧

wordpressのhtml要素ごとで読み込みテンプレートファイルを調べたい

jcas

総合スコア12

WordPress

WordPressは、PHPで開発されているオープンソースのブログソフトウェアです。データベース管理システムにはMySQLを用いています。フリーのブログソフトウェアの中では最も人気が高く、PHPとHTMLを使って簡単にテンプレートをカスタマイズすることができます。

0グッド

0クリップ

投稿2019/05/09 10:02

前提・実現したいこと

テーマ「EMpowerwp」を使っていますが、
トップページで読み込んでいるテンプレートファイルが多いため、
html要素を編集するのに、どのテンプレートファイルに記述されているのかわからず
苦戦しております。

デベロッパーツールでhtml要素をサーチ→記述のあるテンプレートファイルをサーチ→編集
をできるようにしたいです。

トップページがインクルードしているテンプレートファイルは
プラグイン「Show Current Template」で見ることができます。

下記が、インクルードされているテンプレートファイルです。

要素ごとにテンプレートファイルが見つかられるポイントなどありましたら、
教えていただきたいです。何卒よろしくお願いいたします。

該当のソースコード

themes/wp-content-importer-v2/src/WPImporterLogger.php themes/wp-content-importer-v2/src/WPImporterLoggerCLI.php themes/wp-content-importer-v2/src/WXRImporter.php themes/empowerwp/customizer/customizer.php themes/empowerwp/functions.php themes/empowerwp/inc/admin.php themes/empowerwp/inc/blog-options.php themes/empowerwp/inc/defaults.php themes/empowerwp/template-parts/footer/footer-content-lists.php themes/empowerwp/template-parts/header/hero-media-on-right.php themes/mesmerize/class-tgm-plugin-activation.php themes/mesmerize/customizer/kirki/autoloader.php themes/mesmerize/customizer/kirki/includes/class-kirki-config.php themes/mesmerize/customizer/kirki/includes/class-kirki-enqueue.php themes/mesmerize/customizer/kirki/includes/class-kirki-init.php themes/mesmerize/customizer/kirki/includes/class-kirki-l10n.php themes/mesmerize/customizer/kirki/includes/class-kirki-scripts-registry.php themes/mesmerize/customizer/kirki/includes/class-kirki-selective-refresh.php themes/mesmerize/customizer/kirki/includes/class-kirki-toolkit.php themes/mesmerize/customizer/kirki/includes/class-kirki.php themes/mesmerize/customizer/kirki/includes/deprecated.php themes/mesmerize/customizer/kirki/includes/lib/class-aricolor.php themes/mesmerize/customizer/kirki/includes/scripts/class-kirki-scripts-icons.php themes/mesmerize/customizer/kirki/includes/scripts/class-kirki-scripts-tooltips.php themes/mesmerize/customizer/kirki/includes/styles/class-kirki-styles-customizer.php themes/mesmerize/customizer/kirki/includes/styles/class-kirki-styles-frontend.php themes/mesmerize/customizer/kirki/kirki.php themes/mesmerize/footer.php themes/mesmerize/functions.php themes/mesmerize/header-homepage.php themes/mesmerize/inc/blog-options.php themes/mesmerize/inc/companion.php themes/mesmerize/inc/defaults.php themes/mesmerize/inc/footer-options.php themes/mesmerize/inc/functions.php themes/mesmerize/inc/general-options.php themes/mesmerize/inc/general-options/colors.php themes/mesmerize/inc/general-options/companion-options.php themes/mesmerize/inc/general-options/page-settings.php themes/mesmerize/inc/header-options.php themes/mesmerize/inc/header-options/background-options/background-type.php themes/mesmerize/inc/header-options/background-options/background-types/color.php themes/mesmerize/inc/header-options/background-options/background-types/gradient.php themes/mesmerize/inc/header-options/background-options/background-types/image.php themes/mesmerize/inc/header-options/background-options/background-types/slideshow.php themes/mesmerize/inc/header-options/background-options/background-types/video.php themes/mesmerize/inc/header-options/background-options/bottom-arrow.php themes/mesmerize/inc/header-options/background-options/general.php themes/mesmerize/inc/header-options/background-options/header-separator.php themes/mesmerize/inc/header-options/background-options/overlay-type.php themes/mesmerize/inc/header-options/background-options/overlay-types/color-overlay.php themes/mesmerize/inc/header-options/background-options/overlay-types/gradient-overlay.php themes/mesmerize/inc/header-options/background-options/overlay-types/shapes-overlay.php themes/mesmerize/inc/header-options/background.php themes/mesmerize/inc/header-options/content-options/buttons.php themes/mesmerize/inc/header-options/content-options/content-type.php themes/mesmerize/inc/header-options/content-options/inner-pages.php themes/mesmerize/inc/header-options/content-options/subtitle.php themes/mesmerize/inc/header-options/content-options/title.php themes/mesmerize/inc/header-options/content.php themes/mesmerize/inc/header-options/navigation-options/nav-bar.php themes/mesmerize/inc/header-options/navigation-options/offscreen.php themes/mesmerize/inc/header-options/navigation-options/top-bar.php themes/mesmerize/inc/header-options/navigation-options/top-bar/content-areas.php themes/mesmerize/inc/header-options/navigation-options/top-bar/content-types/information.php themes/mesmerize/inc/header-options/navigation-options/top-bar/content-types/social-icons.php themes/mesmerize/inc/header-options/navigation.php themes/mesmerize/inc/header-options/presets.php themes/mesmerize/inc/integrations/index.php themes/mesmerize/inc/optimizations.php themes/mesmerize/inc/templates-functions.php themes/mesmerize/inc/theme-cache-cleaner.php themes/mesmerize/inc/theme-options.php themes/mesmerize/inc/variables.php themes/mesmerize/inc/woocommerce/woocommerce-ready.php themes/mesmerize/inc/wp-forms/mesmerize-template.php themes/mesmerize/inc/wp-forms/wp-forms.php themes/mesmerize/template-parts/navigation/navigation.php themes-controller.php

試したこと

ひたすら可能性のあるテンプレートファイルを開いています。

補足情報(FW/ツールのバージョンなど)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

「Show Current Template」がどういったプラグインなのかは存じ上げませんが、

ソースを見つけて編集するという感覚で使うなら

「String Locator」の方が使いやすいと思います。すごくおおざっぱな使い方ですが

1.テーマを指定して検索する文字列を入力して検索

2.その文字列が含まれる場所が一覧表示される

3.リンクをクリックすればその部分の修正ができる

という感じでテーマファイルはどれ?なしで修正ができるのではないかと思います。

試してみてください。

投稿2019/05/09 13:37

momosiri

総合スコア1509

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

jcas

2019/05/10 08:23

ご紹介いただいた「String Locator」を使って、該当の文字列を見つけ編集できました! ご回答ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問