<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ウィジェット - わぷ道</title>
	<atom:link href="https://wapu-dou.com/post/tag/widget/feed/" rel="self" type="application/rss+xml" />
	<link>https://wapu-dou.com</link>
	<description>主にWordPressで日々詰まったことなど、解決した際の備忘録として残していきたいと思い、作成しました。 そのほかにも、役立つ情報なんかを書いていければと思います。</description>
	<lastBuildDate>Fri, 03 Feb 2023 06:24:13 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>指定したウィジェットのタイトルを非表示にする方法</title>
		<link>https://wapu-dou.com/post/176/</link>
					<comments>https://wapu-dou.com/post/176/#respond</comments>
		
		<dc:creator><![CDATA[akkunday]]></dc:creator>
		<pubDate>Tue, 16 Aug 2022 08:22:57 +0000</pubDate>
				<category><![CDATA[ウェブ制作]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ウィジェット]]></category>
		<guid isPermaLink="false">https://wapu-dou.com/?p=176</guid>

					<description><![CDATA[<p>WordPressのサイドバーなどのウィジェットエリア。 タイトルを表示したいウィジェットと、タイトルを表示したくないウィジェットがあったりしませんか？ ウィジェットのタイトルをそもそも入力しなければ、表示はされませんが、見た目的に何のウィ…</p>
<p>The post <a href="https://wapu-dou.com/post/176/">指定したウィジェットのタイトルを非表示にする方法</a> first appeared on <a href="https://wapu-dou.com">わぷ道</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>WordPressのサイドバーなどのウィジェットエリア。
タイトルを表示したいウィジェットと、タイトルを表示したくないウィジェットがあったりしませんか？

ウィジェットのタイトルをそもそも入力しなければ、表示はされませんが、見た目的に何のウィジェットなのかわかりづらくなってしまう。
そう思った時に調べて出てきた方法がとても参考になったので紹介したいと思います。
</p>

<h2>指定したウィジェットのみタイトルを非表示にする</h2>
<p>下記のソースをWordPressの<strong>functions.php</strong>に追記する事で、特定のウィジェットのみタイトルを非表示にする事ができます。</p>
<pre class="line-numbers"><code class="language-php">add_filter( 'widget_title', 'remove_widget_title' );
function remove_widget_title( $widget_title ) {
  if ( substr ( $widget_title, 0, 1 ) == '!' )
    return;
  else 
    return ( $widget_title );
}
</code></pre>

<h2>ウィジェットの指定方法</h2>
<p>上記phpを設置した後、通常通りウィジェットを作成する際にウィジェットのタイトルの先頭に「!」を入れる事でウィジェットにタイトルが出てこないようになります。</p>
<img fetchpriority="high" decoding="async" src="https://wapu-dou.com/wp-content/uploads/2022/08/wapu-dou-ss1-239x300.png" alt="" width="239" height="300" class="alignnone size-medium wp-image-177" srcset="https://wapu-dou.com/wp-content/uploads/2022/08/wapu-dou-ss1-239x300.png 239w, https://wapu-dou.com/wp-content/uploads/2022/08/wapu-dou-ss1.png 441w" sizes="(max-width: 239px) 100vw, 239px" />

<div class="reference_site_block">
<p class="reference_site_title">参考にしたサイト</p>
<a href="https://webllica.com/wordpress-remove-widget-titles/" target="_blank" rel="noopener">https://webllica.com/wordpress-remove-widget-titles/</a>
</div>		<div class="wpulike wpulike-animated-heart " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="いいねボタン"
					data-ulike-id="176"
					data-ulike-nonce="85307b0fbf"
					data-ulike-type="post"
					data-ulike-template="wpulike-animated-heart"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					data-ulike-append="&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop one&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop two&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop three&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop four&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop five&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop six&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop seven&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop eight&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;&lt;svg class=&quot;wpulike-svg-heart wpulike-svg-heart-pop nine&quot; viewBox=&quot;0 0 32 29.6&quot;&gt;&lt;path d=&quot;M23.6,0c-3.4,0-6.3,2.7-7.6,5.6C14.7,2.7,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.4,9.5,11.9,16,21.2c6.1-9.3,16-12.1,16-21.2C32,3.8,28.2,0,23.6,0z&quot;/&gt;&lt;/svg&gt;"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_176"><svg class="wpulike-svg-heart wpulike-svg-heart-icon" viewBox="0 -28 512.00002 512" xmlns="http://www.w3.org/2000/svg"><path
						d="m471.382812 44.578125c-26.503906-28.746094-62.871093-44.578125-102.410156-44.578125-29.554687 0-56.621094 9.34375-80.449218 27.769531-12.023438 9.300781-22.917969 20.679688-32.523438 33.960938-9.601562-13.277344-20.5-24.660157-32.527344-33.960938-23.824218-18.425781-50.890625-27.769531-80.445312-27.769531-39.539063 0-75.910156 15.832031-102.414063 44.578125-26.1875 28.410156-40.613281 67.222656-40.613281 109.292969 0 43.300781 16.136719 82.9375 50.78125 124.742187 30.992188 37.394531 75.535156 75.355469 127.117188 119.3125 17.613281 15.011719 37.578124 32.027344 58.308593 50.152344 5.476563 4.796875 12.503907 7.4375 19.792969 7.4375 7.285156 0 14.316406-2.640625 19.785156-7.429687 20.730469-18.128907 40.707032-35.152344 58.328125-50.171876 51.574219-43.949218 96.117188-81.90625 127.109375-119.304687 34.644532-41.800781 50.777344-81.4375 50.777344-124.742187 0-42.066407-14.425781-80.878907-40.617188-109.289063zm0 0" /></svg></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value=""></span>			</div></div><p>The post <a href="https://wapu-dou.com/post/176/">指定したウィジェットのタイトルを非表示にする方法</a> first appeared on <a href="https://wapu-dou.com">わぷ道</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://wapu-dou.com/post/176/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
