<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<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">
	<channel>
		<title>Gravity Support Forums Topic: exclude categories from category post-field and include all new categories</title>
		<link>https://legacy.forums.gravityhelp.com/topic/exclude-categories-from-category-post-field-and-include-all-new-categories</link>
		<description>Gravity Support Forums Topic: exclude categories from category post-field and include all new categories</description>
		<language>en-US</language>
		<pubDate>Sun, 05 Apr 2026 06:21:27 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/exclude-categories-from-category-post-field-and-include-all-new-categories" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "exclude categories from category post-field and include all new categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/exclude-categories-from-category-post-field-and-include-all-new-categories#post-80934</link>
			<pubDate>Sun, 14 Oct 2012 21:43:45 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">80934@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Please let us know if you need more help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Casey Kluver on "exclude categories from category post-field and include all new categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/exclude-categories-from-category-post-field-and-include-all-new-categories#post-80928</link>
			<pubDate>Sun, 14 Oct 2012 21:03:27 +0000</pubDate>
			<dc:creator>Casey Kluver</dc:creator>
			<guid isPermaLink="false">80928@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the reply! I did try some of the dynamic population tutorials on this site but it seems the problem may be that it is a post field to a category - and they didn't seem to work. I will try the above recommendations though and see if I can get it to work. &#60;/p&#62;
&#60;p&#62;Thanks I will keep you updated!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "exclude categories from category post-field and include all new categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/exclude-categories-from-category-post-field-and-include-all-new-categories#post-78248</link>
			<pubDate>Mon, 01 Oct 2012 01:36:39 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">78248@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You might have to use dynamic population to exclude the old categories which you do not want shown in the drop down.  Here is an explanation of how to dynamically populate a drop down with the gform_pre_render filter.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Dynamically_Populating_Drop_Down_Fields&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;In the code, &#60;a href=&#34;http://pastie.org/2105544&#34; rel=&#34;nofollow&#34;&#62;http://pastie.org/2105544&#60;/a&#62; on line 14, you will be retrieving categories, not posts, and you will be excluding some categories.  That line, for your application, might look like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
$args = array(
	&#38;#39;type&#38;#39;                     =&#38;gt; &#38;#39;post&#38;#39;,
	&#38;#39;orderby&#38;#39;                  =&#38;gt; &#38;#39;name&#38;#39;,
	&#38;#39;order&#38;#39;                    =&#38;gt; &#38;#39;ASC&#38;#39;,
	// show only children of parent category 3
	&#38;#39;parent&#38;#39;                    =&#38;gt; &#38;#39;3&#38;#39;,
	// exclude categories 4, 7, 12 and 25
	&#38;#39;exclude&#38;#39;                  =&#38;gt; &#38;#39;4,7,12,25&#38;#39;,
	&#38;#39;taxonomy&#38;#39;                 =&#38;gt; &#38;#39;category&#38;#39;);
$categories = get_categories($args);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Then, loop through the categories, not the posts.&#60;/p&#62;
&#60;p&#62;Here is the documentation for get_categories:&#60;br /&#62;
&#60;a href=&#34;http://codex.wordpress.org/Function_Reference/get_categories&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/get_categories&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Casey Kluver on "exclude categories from category post-field and include all new categories"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/exclude-categories-from-category-post-field-and-include-all-new-categories#post-77551</link>
			<pubDate>Wed, 26 Sep 2012 19:04:47 +0000</pubDate>
			<dc:creator>Casey Kluver</dc:creator>
			<guid isPermaLink="false">77551@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi I have a form where I want to include a drop-down menu to post a category. I want the drop-down to be populated will all categories - so new ones that get created. However there are 4 old categories that I would like to exclude from the list. Is this possible? I have also tried to simply remove the list items using nth-child with jquery - however this won't work because the drop-down gets sorted by alphabetical order and when a new category is added that with mess with the order. Does anyone have any thoughts on how I can accomplish this?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
