<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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>日々 | wordpress備忘録ちゃん | アクティビティ</title>
	<link>https://hi-bi.net/member/wpfun/activity/</link>
	<atom:link href="https://hi-bi.net/member/wpfun/activity/feed/" rel="self" type="application/rss+xml" />
	<description>wordpress備忘録ちゃん についてのアクティビティフィード。</description>
	<lastBuildDate>Thu, 18 Dec 2025 08:27:54 +0900</lastBuildDate>
	<generator>https://buddypress.org/?v=</generator>
	<language>ja</language>
	<ttl>30</ttl>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>2</sy:updateFrequency>
	
						<item>
				<guid isPermaLink="false">6657c2a29d377e4fb3c59f2e28dbca37</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: 投稿のカテゴリ毎にテンプレートを変えるには、single.phpにテンプレートを分岐して読み込みさせる記述をします。なので、 [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17506/</link>
				<pubDate>Mon, 14 Nov 2022 17:00:27 +0900</pubDate>

									<content:encoded><![CDATA[<p>投稿のカテゴリ毎にテンプレートを変えるには、single.phpにテンプレートを分岐して読み込みさせる記述をします。なので、single.phpは『single-default.php』などにコピーをしてからsingle.phpの内容を次のように書き換えます。</p>
<p>single.phpに記述します（書き換えます）<br />
<code><br />
&lt;?php $post = $wp_query-&gt;post;<br />
  if ( in_category('blog') ) {<br />
  include(TEMPLATEPATH.'/single-blog.php');<br />
//カテゴリのスラッグがblogなら single-blog.phpを読み込む<br />
  } elseif ( in_category('health') ) {&hellip;</code><span class="activity-read-more" id="activity-read-more-17506"><a href="https://hi-bi.net/activity/p/17506/" rel="nofollow ugc">[ 続きを読む ]</a></span></p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
					<item>
				<guid isPermaLink="false">a928ee2c71b9d44f5b9c021de97bf61e</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: wordpressのダッシュボードのデザインをちょっとだけ変えたい時に、自分で作成したCSSを読み込ませるコードです。 [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17510/</link>
				<pubDate>Thu, 10 Nov 2022 09:27:23 +0900</pubDate>

									<content:encoded><![CDATA[<p>wordpressのダッシュボードのデザインをちょっとだけ変えたい時に、自分で作成したCSSを読み込ませるコードです。</p>
<p>function.phpに追加します。</p>
<p><code><br />
//管理ダッシュボード変更CSS読み込み<br />
add_action('admin_enqueue_scripts', 'custom_enqueue');<br />
function custom_enqueue() {<br />
wp_enqueue_style('custom_css', get_template_directory_uri() . '/css/kanri.css');<br />
}<br />
</code></p>
<p>ちょっとだけ幅を整えたり、いらないものを非表示にしたりかゆいところに手を届けるコードですね。</p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
					<item>
				<guid isPermaLink="false">4c209e6cbf3fbb2a165db6364d241fde</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: wordpressが標準でヘッダーに吐き出すものの中には、全然必要ないものも多くあるため、function.phpで削除した [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17511/</link>
				<pubDate>Thu, 10 Nov 2022 09:04:43 +0900</pubDate>

									<content:encoded><![CDATA[<p>wordpressが標準でヘッダーに吐き出すものの中には、全然必要ないものも多くあるため、function.phpで削除したほうがソースコードもすっきりしてページの読み込み速度も向上できます。使いたい機能が出てきた場合に復活させれば大丈夫です。</p>
<p><code><br />
/* DNSプリフェッチ設定の削除 */<br />
add_filter( 'emoji_svg_url', '__return_false' );</p>
<p>/* 絵文字削除 */<br />
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );<br />
remove_action( 'admin_print_scripts', 'print_emoji_de&hellip;</code><span class="activity-read-more" id="activity-read-more-17511"><a href="https://hi-bi.net/activity/p/17511/" rel="nofollow ugc">[ 続きを読む ]</a></span></p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
					<item>
				<guid isPermaLink="false">da4191d945f0274132ca335e82833967</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: プラグインが吐き出すCSSをヘッダーから削除する
プラグインについているCSSはそのまま何も考えずに使えて便利なんですが、 [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17513/</link>
				<pubDate>Wed, 09 Nov 2022 17:06:55 +0900</pubDate>

									<content:encoded><![CDATA[<p>プラグインが吐き出すCSSをヘッダーから削除する<br />
プラグインについているCSSはそのまま何も考えずに使えて便利なんですが、フルスクラッチでデザインをする場合やヘッダーを軽くして体感速度向上させるなど、ヘッダーからCSSを削除させるコードです。</p>
<p>ちなみに、ヘッダーから消えるだけでかなりの速度向上が体感できる場合が多いです。</p>
<p>function.phpに追加して使います。</p>
<p><code><br />
// プラグインCSSをヘッダーから削除 */<br />
function cut_plugin_css() {<br />
wp_deregister_style( 'wpfp-public-style' );<br />
wp_deregister_style( 'tablepress-default' );<br />
//wp_der&hellip;</code><span class="activity-read-more" id="activity-read-more-17513"><a href="https://hi-bi.net/activity/p/17513/" rel="nofollow ugc">[ 続きを読む ]</a></span></p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
					<item>
				<guid isPermaLink="false">9b8222be70eacf75d323b984e9a4d85a</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: buddypressでユーザーがフロントエンドで投稿できるような仕様にした場合、記事のフッターに配置されるauthor_li [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17514/</link>
				<pubDate>Wed, 09 Nov 2022 16:25:57 +0900</pubDate>

									<content:encoded><![CDATA[<p>buddypressでユーザーがフロントエンドで投稿できるような仕様にした場合、記事のフッターに配置されるauthor_linkが著者アーカイブに飛ばずに、buddypressメンバープロフィールに飛ぶように変更するコードです。</p>
<p>function.phpに追加します。<br />
<code><br />
//著者リンクをbuddypressプロフィールに変える<br />
add_filter( 'author_link', 'change_author_link', 10, 1 );<br />
function change_author_link($link) {<br />
$username=get_the_author_meta('user_nicename');<br />
$link = 'メンバーページのURL(/member/とか)'&hellip;</code><span class="activity-read-more" id="activity-read-more-17514"><a href="https://hi-bi.net/activity/p/17514/" rel="nofollow ugc">[ 続きを読む ]</a></span></p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
					<item>
				<guid isPermaLink="false">dff2d8b8a5e179c00062e795896efb8c</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: wordpressやbuddypressにログインして投稿作成する時に、メディアをクリックすると、他のユーザーがアップロード [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17515/</link>
				<pubDate>Wed, 09 Nov 2022 16:18:16 +0900</pubDate>

									<content:encoded><![CDATA[<p>wordpressやbuddypressにログインして投稿作成する時に、メディアをクリックすると、他のユーザーがアップロードした画像まですべてが見えてしまいます。これを「自分（ログイン中のユーザー）がアップした画像だけ表示」させたい時のコードです。</p>
<p>function.phpに追加するだけです。<br />
<code>//メディアをユーザー間で見えなくする<br />
function display_only_self_uploaded_medias( $query ) {<br />
if ( $user = wp_get_current_user() ) {<br />
$query['author'] = $user-&gt;ID;<br />
}<br />
return $query;<br />
}<br />
add_action( 'ajax_query_atta&hellip;</code><span class="activity-read-more" id="activity-read-more-17515"><a href="https://hi-bi.net/activity/p/17515/" rel="nofollow ugc">[ 続きを読む ]</a></span></p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
					<item>
				<guid isPermaLink="false">234e60f75af279c3bf3782a50b1f1edf</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: wordpressやbuddypressにログインしているユーザーとログインしていないゲストユーザーで表示させたいものを変え [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17516/</link>
				<pubDate>Wed, 09 Nov 2022 15:00:24 +0900</pubDate>

									<content:encoded><![CDATA[<p>wordpressやbuddypressにログインしているユーザーとログインしていないゲストユーザーで表示させたいものを変えたい時のコードです。</p>
<p>「ゲストの場合は新規登録ボタンを表示、ログインしていたら新規登録ボタンは非表示」などの表示切り替えやメニューなどさまざまなところで使えます。<br />
<code><br />
&lt;!-- ログイン判定コード --&gt;<br />
&lt;?php if( is_user_logged_in() ) : ?&gt;<br />
&lt;!--ログインしている人にのみ表示されます。--&gt;<br />
&lt;?php else : ?&gt;<br />
&lt;!--ログインしていない人に表示されます。--&gt;<br />
&lt;?php endif; ?&gt;<br />
</code></p>
<p>結構使うのですが、なかなか覚えられないコードのひとつです（汗）&hellip;</p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
					<item>
				<guid isPermaLink="false">80a74d08d1124a7b85d7cae9a951f47d</guid>
				<title>wordpress備忘録ちゃん が更新を投稿: buddypressのプロフィール欄で複数行を改行付きで入力しても、１行で表示されます。これを入力時の改行（HTML）を反映 [&#133;]</title>
				<link>https://hi-bi.net/activity/p/17517/</link>
				<pubDate>Wed, 09 Nov 2022 09:31:17 +0900</pubDate>

									<content:encoded><![CDATA[<p>buddypressのプロフィール欄で複数行を改行付きで入力しても、１行で表示されます。これを入力時の改行（HTML）を反映させた状態で表示させたいときのコードです。</p>
<p><code>&lt;?php if (bp_get_profile_field_data('field=プロフィール') == "") :<br />
echo '';<br />
else:<br />
// display code<br />
$data=bp_get_member_profile_data(array('field'=&gt;'プロフィール'));<br />
echo 'プロフィール;';<br />
echo wpautop($data);//wpautopというのが改行を有効にしているの<br />
endif; ?&gt;</c&hellip;</code><span class="activity-read-more" id="activity-read-more-17517"><a href="https://hi-bi.net/activity/p/17517/" rel="nofollow ugc">[ 続きを読む ]</a></span></p>
]]></content:encoded>
				
									<slash:comments>0</slash:comments>
				
							</item>
		
	</channel>
</rss>