<?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: putting action/filter hooks in a different file other than functions.php</title>
		<link>https://legacy.forums.gravityhelp.com/topic/putting-actionfilter-hooks-in-a-different-file-other-than-functionsphp</link>
		<description>Gravity Support Forums Topic: putting action/filter hooks in a different file other than functions.php</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 02:36:26 +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/putting-actionfilter-hooks-in-a-different-file-other-than-functionsphp" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "putting action/filter hooks in a different file other than functions.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/putting-actionfilter-hooks-in-a-different-file-other-than-functionsphp#post-67763</link>
			<pubDate>Tue, 24 Jul 2012 16:11:43 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">67763@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the tip.  That's a good way to handle it.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>elizabethanne on "putting action/filter hooks in a different file other than functions.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/putting-actionfilter-hooks-in-a-different-file-other-than-functionsphp#post-67736</link>
			<pubDate>Tue, 24 Jul 2012 11:50:24 +0000</pubDate>
			<dc:creator>elizabethanne</dc:creator>
			<guid isPermaLink="false">67736@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;i made a site-specific plugin for my sites - works like a charm and is way easier than putting things in functions.php - here's an article about it from Otto: &#60;a href=&#34;http://ottopress.com/2011/creating-a-site-specific-snippets-plugin/&#34; rel=&#34;nofollow&#34;&#62;http://ottopress.com/2011/creating-a-site-specific-snippets-plugin/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;one thing to note - sometimes code put in there doesn't fire at the right times to work, so it still needs to go in functions.php.  i'm not advanced enough to know WHY, but i try my snippet in my site plugin first and then if the code isn't &#34;working&#34; put it in functions. php.  &#60;/p&#62;
&#60;p&#62;hope this helps!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "putting action/filter hooks in a different file other than functions.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/putting-actionfilter-hooks-in-a-different-file-other-than-functionsphp#post-67683</link>
			<pubDate>Tue, 24 Jul 2012 08:02:21 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">67683@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You should be able to use&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;require_once(&#38;#39;includes/function-details.php&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;to pull in functions into your functions.php file without any issue. As long as your add action code was in the functions.php file and not the include.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>run23 on "putting action/filter hooks in a different file other than functions.php"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/putting-actionfilter-hooks-in-a-different-file-other-than-functionsphp#post-67667</link>
			<pubDate>Tue, 24 Jul 2012 03:20:44 +0000</pubDate>
			<dc:creator>run23</dc:creator>
			<guid isPermaLink="false">67667@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is a PHP question rather than WP or GF...&#60;/p&#62;
&#60;p&#62;Does anyone know how to put custom action/filter hooks in a different file other than functions.php?&#60;/p&#62;
&#60;p&#62;I tried to put a hook function in different file (my_hooks.php), then simply include that file in functions.php, but I'm getting an undefined function error. My whole purpose in doing this is to reduce the amount of custom code I put in functions.php.&#60;/p&#62;
&#60;p&#62;Ideally, I would like to only register the hooks in functions.php, but all the useful code live elsewhere.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
