<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Wordpress on qwerty.work</title>
        <link>https://qwerty.work/categories/wordpress/</link>
        <description>Recent content in Wordpress on qwerty.work</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>ja-JP</language>
        <lastBuildDate>Mon, 03 Jun 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://qwerty.work/categories/wordpress/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>【Wordpress】TCDテーマ「GENESIS」関連メモ</title>
            <link>https://qwerty.work/post/2024/06/wordpresstcd%E3%83%86%E3%83%BC%E3%83%9Egenesis%E9%96%A2%E9%80%A3%E3%83%A1%E3%83%A2/</link>
            <pubDate>Mon, 03 Jun 2024 00:00:00 +0000</pubDate>
            <guid>https://qwerty.work/post/2024/06/wordpresstcd%E3%83%86%E3%83%BC%E3%83%9Egenesis%E9%96%A2%E9%80%A3%E3%83%A1%E3%83%A2/</guid>
            <description>&lt;p&gt;TCDのワードプレステンプレート「&lt;a class=&#34;link&#34; href=&#34;https://tcd-theme.com/tcd103&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;GENESIS&lt;/a&gt;（ジェネシス）」でサイト制作した際に参考にしたページのメモ。&lt;/p&gt;&#xA;&lt;h2 id=&#34;tcdテンプレート用のcssリファレンス&#34;&gt;TCDテンプレート用のCSSリファレンス&#xA;&lt;/h2&gt;&lt;h3 id=&#34;genesis用のタグとcss&#34;&gt;GENESIS用のタグとCSS&#xA;&lt;/h3&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://demo.tcd-theme.com/tcd103/quicktags&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://demo.tcd-theme.com/tcd103/quicktags&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;共通css&#34;&gt;共通CSS&#xA;&lt;/h3&gt;&lt;p&gt;TCDのテンプレートで共通して使えるCSS集。&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://tcd-theme.com/2018/12/utility-css.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;すべてのTCDテーマで使える｜便利なCSS・汎用クラスの使い方 | ワードプレステーマTCD (tcd-theme.com)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;tcdテーマgenesisの公式ページ&#34;&gt;TCDテーマ「GENESIS」の公式ページ&#xA;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://tcd-theme.com/tcd103&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;WordPressテーマ「GENESIS（TCD103）」 (tcd-theme.com)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;デモサイト&#34;&gt;デモサイト&#xA;&lt;/h3&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://demo.tcd-theme.com/tcd103/service/biopharma/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;バイオ医療プロジェクト | WordPressテーマ「GENESIS」 (tcd-theme.com)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://demo.tcd.cool/tcd103/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;WordPress theme &amp;ldquo;GENESIS&amp;rdquo; | Demo site of WordPress theme &amp;ldquo;GENESIS (TCD103)&amp;rdquo;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
        </item><item>
            <title>【Wordpress】下層フォルダー(下層ディレクトリ）に設置したwordpressをルートディレクリの表示に変更する方法</title>
            <link>https://qwerty.work/post/2024/05/wordpress%E4%B8%8B%E5%B1%A4%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%83%BC%E4%B8%8B%E5%B1%A4%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E8%A8%AD%E7%BD%AE/</link>
            <pubDate>Wed, 29 May 2024 00:00:00 +0000</pubDate>
            <guid>https://qwerty.work/post/2024/05/wordpress%E4%B8%8B%E5%B1%A4%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%83%BC%E4%B8%8B%E5%B1%A4%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E8%A8%AD%E7%BD%AE/</guid>
            <description>&lt;p&gt;Wordpressを**/wp&lt;strong&gt;や&lt;/strong&gt;/wordpress**などの下層ディレクトリにインストールして、ページの表示はルートディレクトリで表示したい場合の設定手順をメモ。&lt;/p&gt;&#xA;&lt;p&gt;例） &lt;a class=&#34;link&#34; href=&#34;https://domain.com/wp&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://domain.com/wp&lt;/a&gt;　→　https://domain.com で公開。&lt;/p&gt;&#xA;&lt;h2 id=&#34;手順&#34;&gt;手順&#xA;&lt;/h2&gt;&lt;h3 id=&#34;1サイトアドレスのパスを変更&#34;&gt;1.サイトアドレスのパスを変更&#xA;&lt;/h3&gt;&lt;p&gt;WordPressの管理画面で、&lt;strong&gt;「設定」&lt;/strong&gt;-&amp;gt;**「一般」**を開き、**サイトアドレス（URL）**の欄を、ルートディレクトリのURLに変更します。「変更を保存」をクリックし、保存。&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Wordpressのサイトアドレス変更画面&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;727px&#34; data-flex-grow=&#34;303&#34; height=&#34;198&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://qwerty.work/post/2024/05/wordpress%E4%B8%8B%E5%B1%A4%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%83%BC%E4%B8%8B%E5%B1%A4%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E8%A8%AD%E7%BD%AE/images/2024-6-26_9-29-47_No-00.png&#34; width=&#34;600&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;2ファイルをコピー&#34;&gt;2.ファイルをコピー&#xA;&lt;/h3&gt;&lt;p&gt;/wpディレクトリにある&lt;strong&gt;index.php&lt;/strong&gt;と**.htaccess**をルートディレクトリにコピー。&lt;/p&gt;&#xA;&lt;h3 id=&#34;3ファイルの編集&#34;&gt;3.ファイルの編集&#xA;&lt;/h3&gt;&lt;p&gt;ルートディレクトリにコピーしたindex.phpを以下のように変更して上書き保存。&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;require DIR . &amp;#39;/wp-blog-header.php&amp;#39;;　↓require __DIR__ . &amp;#39;/wp/wp-blog-header.php&amp;#39;;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;4パーマリンクの更新ボタンを押す&#34;&gt;4.パーマリンクの更新ボタンを押す&#xA;&lt;/h3&gt;&lt;p&gt;WordPressの管理画面で、&lt;strong&gt;「設定」&lt;/strong&gt;-&amp;gt;**「パーマリンク設定」**を開き、何も変更せず「変更を保存」ボタンだけ押します。&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Wordpressのパーマリンク設定の画面&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;222px&#34; data-flex-grow=&#34;92&#34; height=&#34;391&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://qwerty.work/post/2024/05/wordpress%E4%B8%8B%E5%B1%A4%E3%83%95%E3%82%A9%E3%83%AB%E3%83%80%E3%83%BC%E4%B8%8B%E5%B1%A4%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E8%A8%AD%E7%BD%AE/images/2024-6-26_10-17-29_No-00.png&#34; width=&#34;363&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;以上。これで、ルートのURLでWordpressサイトにアクセスできるはずです。&lt;/p&gt;&#xA;&lt;h3 id=&#34;参考サイト&#34;&gt;参考サイト&#xA;&lt;/h3&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://schlaf.ltd/blog/wordpress-root-directory/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;【割と沼りがち】WordPressのルートディレクトリ変更の方法を解説 (schlaf.ltd)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://sologaku.com/wordpress/moving-wordpress-to-a-subdirectory/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Wordpressをサブディレクトリに移動する方法まとめ！［URL変更あり、URL変更なし］ - ソロ学 (sologaku.com)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://takumibu.com/wp_subdirectory-install/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;WPをサブディレクトリにインストールしURLは直下にする方法 (takumibu.com)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
        </item><item>
            <title>【Wordpress】各記事のページに投稿編集用のリンクを設置</title>
            <link>https://qwerty.work/post/2022/12/wordpress%E5%90%84%E8%A8%98%E4%BA%8B%E3%81%AE%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E6%8A%95%E7%A8%BF%E7%B7%A8%E9%9B%86%E7%94%A8%E3%81%AE%E3%83%AA%E3%83%B3%E3%82%AF%E3%82%92%E8%A8%AD/</link>
            <pubDate>Mon, 19 Dec 2022 00:00:00 +0000</pubDate>
            <guid>https://qwerty.work/post/2022/12/wordpress%E5%90%84%E8%A8%98%E4%BA%8B%E3%81%AE%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AB%E6%8A%95%E7%A8%BF%E7%B7%A8%E9%9B%86%E7%94%A8%E3%81%AE%E3%83%AA%E3%83%B3%E3%82%AF%E3%82%92%E8%A8%AD/</guid>
            <description>&lt;h2 id=&#34;サクッと編集するためのリンクを設置したい&#34;&gt;サクッと編集するためのリンクを設置したい&#xA;&lt;/h2&gt;&lt;p&gt;Wordpressの記事を投稿した後に、誤字脱字の訂正や間違いの変更、追記など行うことがよくりますが、その度にログイン画面のURLを打ったり、お気に入りからログイン画面を出すのが面倒です。&lt;/p&gt;&#xA;&lt;p&gt;そこで、投稿ページの記事内に編集用のリンクが欲しいなと思ったので、やり方をいくつか見つけたのでメモ。&lt;/p&gt;&#xA;&lt;h3 id=&#34;記事の最後にリンクを設置する方法&#34;&gt;記事の最後にリンクを設置する方法&#xA;&lt;/h3&gt;&lt;p&gt;function.phpにコードを追加して、記事の一番下に編集用のリンクを設置する方法の参考ページ。&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://q-az.net/wordpress-entry-edit-button/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://q-az.net/wordpress-entry-edit-button/&#34; alt=&#34;https://q-az.net/wordpress-entry-edit-button/&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://q-az.net/wordpress-entry-edit-button/&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://q-az.net/wordpress-entry-edit-button/&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h3 id=&#34;記事内の任意の場所にリンクを設置する方法&#34;&gt;記事内の任意の場所にリンクを設置する方法&#xA;&lt;/h3&gt;&lt;p&gt;single.phpにコードを追加して、任意の記事内の任意の場所にリンクを設置する方法の参考ページ。&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://jiguma.com/wp-edit-button/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://jiguma.com/wp-edit-button/&#34; alt=&#34;https://jiguma.com/wp-edit-button/&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://jiguma.com/wp-edit-button/&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://jiguma.com/wp-edit-button/&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h3 id=&#34;その他参考&#34;&gt;その他参考&#xA;&lt;/h3&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;  &#xA;&#xA;&#xA;&lt;div class=&#34;link-card&#34;&gt;&#xA;  &lt;a href=&#34;https://www.miso.blog/wordpress-get-admin-url/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-image&#34;&gt;&#xA;      &lt;img src=&#34;https://image.thum.io/get/width/300/crop/200/https://www.miso.blog/wordpress-get-admin-url/&#34; alt=&#34;https://www.miso.blog/wordpress-get-admin-url/&#34; loading=&#34;lazy&#34;&gt;&#xA;    &lt;/div&gt;&#xA;    &#xA;    &lt;div class=&#34;link-card-body&#34;&gt;&#xA;      &lt;span class=&#34;link-card-title&#34;&gt;https://www.miso.blog/wordpress-get-admin-url/&lt;/span&gt;&#xA;      &#xA;      &lt;span class=&#34;link-card-url&#34;&gt;https://www.miso.blog/wordpress-get-admin-url/&lt;/span&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&#xA;</description>
        </item><item>
            <title>【Wordpress】公開URLを別階層のディレクトリに変更したいとき</title>
            <link>https://qwerty.work/post/2022/11/wordpress%E5%85%AC%E9%96%8Burl%E3%82%92%E5%88%A5%E9%9A%8E%E5%B1%A4%E3%81%AE%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E5%A4%89%E6%9B%B4%E3%81%97%E3%81%9F/</link>
            <pubDate>Tue, 29 Nov 2022 00:00:00 +0000</pubDate>
            <guid>https://qwerty.work/post/2022/11/wordpress%E5%85%AC%E9%96%8Burl%E3%82%92%E5%88%A5%E9%9A%8E%E5%B1%A4%E3%81%AE%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E5%A4%89%E6%9B%B4%E3%81%97%E3%81%9F/</guid>
            <description>&lt;p&gt;Wordpressを&lt;code&gt;/wp&lt;/code&gt;のディレクトリにインストールして、公開はルートのURLでしたいというのはよくある話で、その方法は検索すれば沢山出てきます。しかし、今回はルートではなく、インストールディレクトリと同階層の別のディレクトリで公開することになりました。そこで、すこし手こずったのでメモ。&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;974px&#34; data-flex-grow=&#34;405&#34; height=&#34;167&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://qwerty.work/post/2022/11/wordpress%E5%85%AC%E9%96%8Burl%E3%82%92%E5%88%A5%E9%9A%8E%E5%B1%A4%E3%81%AE%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%E3%81%AB%E5%A4%89%E6%9B%B4%E3%81%97%E3%81%9F/images/wp-admin_options-general.png&#34; width=&#34;678&#34;&gt;&lt;/p&gt;&#xA;&lt;figcaption&gt;&#xA;&lt;p&gt;[設定] -[一般設定]の画面&lt;/p&gt;&#xA;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;変更手順&#34;&gt;変更手順&#xA;&lt;/h2&gt;&lt;h3 id=&#34;htaccessとindexphpを公開ディレクトリにコピー&#34;&gt;.htaccessとindex.phpを公開ディレクトリにコピー&#xA;&lt;/h3&gt;&lt;p&gt;今回、&lt;code&gt;https://example.com/blog/&lt;/code&gt;というURLでブログを公開する例で説明します。その場合、まずはルートにblogフォルダを作成して、&lt;code&gt;/wp&lt;/code&gt;直下にある**.htaccess&lt;strong&gt;と&lt;/strong&gt;index.php**をコピーして、&lt;code&gt;/blog&lt;/code&gt;直下に貼り付けます。&lt;/p&gt;&#xA;&lt;h3 id=&#34;indexphpを変更&#34;&gt;index.phpを変更&#xA;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;/blog&lt;/code&gt;直下に貼り付けたindex.phpを以下のようにコードを変換します。（example.com/blog/index.php）&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;require __DIR__ . &amp;#39;/wp-blog-header.php&amp;#39;;&#xA;　↓&#xA;require dirname(__DIR__, 1). &amp;#39;/wp/wp-blog-header.php&amp;#39;;&#xA;また&#xA;require dirname(__FILE__, 2). &amp;#39;/wp/wp-blog-header.php&amp;#39;;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;dirname(__DIR__, 1)&lt;/code&gt;はこのディレクトリパスから1段上の階層までのパスを取得します。&lt;code&gt;dirname(__FILE__, 2)&lt;/code&gt;はこのファイルパスからファイル名を含めて2段上の階層までを取得するという意味になっています。&lt;code&gt;__DIR__&lt;/code&gt;と&lt;code&gt;__FILE__&lt;/code&gt;で絶対パスと相対パスの使い方に行き詰まり、この方法にたどり着きました。&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
