<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: How To Show/Hide WordPress Meta Boxes By Selecting Categories	</title>
	<atom:link href="https://www.farinspace.com/show-hide-meta-box-by-category/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.farinspace.com/show-hide-meta-box-by-category/</link>
	<description>Practical Real World Web Development</description>
	<lastBuildDate>Wed, 24 Dec 2014 00:13:01 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>
		By: Matthew Pollard		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-37599</link>

		<dc:creator><![CDATA[Matthew Pollard]]></dc:creator>
		<pubDate>Wed, 24 Dec 2014 00:13:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-37599</guid>

					<description><![CDATA[Does anyone know of a tutorial that uses a more step to step method? I have followed this tutorial but it doesn&#039;t seem to work. I must have missed something out. Any help would be greatly appreciated!]]></description>
			<content:encoded><![CDATA[<p>Does anyone know of a tutorial that uses a more step to step method? I have followed this tutorial but it doesn&#8217;t seem to work. I must have missed something out. Any help would be greatly appreciated!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: lara		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-37583</link>

		<dc:creator><![CDATA[lara]]></dc:creator>
		<pubDate>Thu, 25 Sep 2014 14:42:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-37583</guid>

					<description><![CDATA[Never mind, I&#039;ve found the solution. Thanks!!!]]></description>
			<content:encoded><![CDATA[<p>Never mind, I&#8217;ve found the solution. Thanks!!!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: lara		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-37582</link>

		<dc:creator><![CDATA[lara]]></dc:creator>
		<pubDate>Thu, 25 Sep 2014 14:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-37582</guid>

					<description><![CDATA[Excuse me, where do I put the javascript? in which file? Sorry but I&#039;m not a developer and I&#039;m willing to learn. Thanks!]]></description>
			<content:encoded><![CDATA[<p>Excuse me, where do I put the javascript? in which file? Sorry but I&#8217;m not a developer and I&#8217;m willing to learn. Thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Russell		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-37549</link>

		<dc:creator><![CDATA[Russell]]></dc:creator>
		<pubDate>Thu, 12 Jun 2014 11:49:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-37549</guid>

					<description><![CDATA[Quick Q

How do I do this if my text editor won&#039;t create an id starting with an &#039;_&#039;

#_custom_meta_metabox is not being compiled in the css as an ID

Cheers]]></description>
			<content:encoded><![CDATA[<p>Quick Q</p>
<p>How do I do this if my text editor won&#8217;t create an id starting with an &#8216;_&#8217;</p>
<p>#_custom_meta_metabox is not being compiled in the css as an ID</p>
<p>Cheers</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: James		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-26504</link>

		<dc:creator><![CDATA[James]]></dc:creator>
		<pubDate>Fri, 28 Dec 2012 01:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-26504</guid>

					<description><![CDATA[update: i finally realized i needed to remove 


//


from the js file, silly me :)

All works now.]]></description>
			<content:encoded><![CDATA[<p>update: i finally realized i needed to remove </p>
<p>//</p>
<p>from the js file, silly me 🙂</p>
<p>All works now.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: James		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-26499</link>

		<dc:creator><![CDATA[James]]></dc:creator>
		<pubDate>Thu, 27 Dec 2012 19:30:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-26499</guid>

					<description><![CDATA[well, have the css in place, and calling the js file, changed the id, changed the js meta box, but it won&#039;t work. 

Not sure what i am missing, any tips?]]></description>
			<content:encoded><![CDATA[<p>well, have the css in place, and calling the js file, changed the id, changed the js meta box, but it won&#8217;t work. </p>
<p>Not sure what i am missing, any tips?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: James		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-26495</link>

		<dc:creator><![CDATA[James]]></dc:creator>
		<pubDate>Thu, 27 Dec 2012 17:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-26495</guid>

					<description><![CDATA[Hi there. I&#039;d like to get this working but this post demands a certain knoweldge i don&#039;t have on where to put these things mentions in your video. Could you provide a bit more of a step by step guide?]]></description>
			<content:encoded><![CDATA[<p>Hi there. I&#8217;d like to get this working but this post demands a certain knoweldge i don&#8217;t have on where to put these things mentions in your video. Could you provide a bit more of a step by step guide?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Kostas		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-22945</link>

		<dc:creator><![CDATA[Kostas]]></dc:creator>
		<pubDate>Tue, 24 Apr 2012 14:34:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-22945</guid>

					<description><![CDATA[I get the following error when adding the above code:

uncaught referenceError: jquery is not defined

Any idea??]]></description>
			<content:encoded><![CDATA[<p>I get the following error when adding the above code:</p>
<p>uncaught referenceError: jquery is not defined</p>
<p>Any idea??</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andrew		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-21239</link>

		<dc:creator><![CDATA[Andrew]]></dc:creator>
		<pubDate>Fri, 20 Jan 2012 14:55:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-21239</guid>

					<description><![CDATA[A nice little addition to this for theme developers (and I&#039;m sure you can add more) is to add a &quot;get Cat by Name&quot; function, and echo the results into line 16. 

This way, your theme doesn&#039;t rely on you to know the category #&#039;s just to specify a NAME for the category.

&lt;em&gt;Add this to functions . php&lt;/em&gt;

[code lang=&quot;php&quot;]
function get_category_id($cat_name){
	$term = get_term_by(&#039;name&#039;, $cat_name, &#039;category&#039;);
	return $term-&#062;term_id;
}
[/code]

And finally, change line 16 of the JS to this:

[code lang=&quot;php&quot;]
if ($.inArray(id, []) &#062; -1 &#038;&#038; $(this).is(&#039;:checked&#039;))
[/code]

I am also sure that you could use this cat id function in a foreach loop to list a bunch of categories.]]></description>
			<content:encoded><![CDATA[<p>A nice little addition to this for theme developers (and I&#8217;m sure you can add more) is to add a &#8220;get Cat by Name&#8221; function, and echo the results into line 16. </p>
<p>This way, your theme doesn&#8217;t rely on you to know the category #&#8217;s just to specify a NAME for the category.</p>
<p><em>Add this to functions . php</em></p>
<pre class="brush: php; title: ; notranslate">
function get_category_id($cat_name){
	$term = get_term_by('name', $cat_name, 'category');
	return $term-&gt;term_id;
}
</pre>
<p>And finally, change line 16 of the JS to this:</p>
<pre class="brush: php; title: ; notranslate">
if ($.inArray(id, &#x5B;]) &gt; -1 &amp;&amp; $(this).is(':checked'))
</pre>
<p>I am also sure that you could use this cat id function in a foreach loop to list a bunch of categories.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Markus		</title>
		<link>https://www.farinspace.com/show-hide-meta-box-by-category/#comment-17828</link>

		<dc:creator><![CDATA[Markus]]></dc:creator>
		<pubDate>Mon, 26 Sep 2011 09:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.farinspace.com/?p=1383#comment-17828</guid>

					<description><![CDATA[Hi,

try it but it didn´t work for me...

i create a .js File, Paste the above Code in it, change the id to my metabox id.

i run the script with
&lt;code&gt;
wp_register_script(&#039;check_js&#039;, (get_bloginfo(&#039;template_url&#039;).&#039;/js/check.js&#039;), false);
wp_enqueue_script(&#039;check_js&#039;);
&lt;/code&gt;

but when i click on the category nothing happens. the metabox will not display...

any ideas?

best regards,
Markus]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>try it but it didn´t work for me&#8230;</p>
<p>i create a .js File, Paste the above Code in it, change the id to my metabox id.</p>
<p>i run the script with<br />
<code><br />
wp_register_script('check_js', (get_bloginfo('template_url').'/js/check.js'), false);<br />
wp_enqueue_script('check_js');<br />
</code></p>
<p>but when i click on the category nothing happens. the metabox will not display&#8230;</p>
<p>any ideas?</p>
<p>best regards,<br />
Markus</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
