<?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: Styling messed up when calling form from theme functions file vs. in post itself</title>
		<link>https://legacy.forums.gravityhelp.com/topic/styling-messed-up-when-calling-form-from-theme-functions-file-vs-in-post-itself</link>
		<description>Gravity Support Forums Topic: Styling messed up when calling form from theme functions file vs. in post itself</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 16:20:57 +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/styling-messed-up-when-calling-form-from-theme-functions-file-vs-in-post-itself" rel="self" type="application/rss+xml" />

		<item>
			<title>Billmcq on "Styling messed up when calling form from theme functions file vs. in post itself"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/styling-messed-up-when-calling-form-from-theme-functions-file-vs-in-post-itself#post-31246</link>
			<pubDate>Sat, 30 Jul 2011 17:46:08 +0000</pubDate>
			<dc:creator>Billmcq</dc:creator>
			<guid isPermaLink="false">31246@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;thanks for your reply.  .I guess that is the issue for sure, but I was using a function to add that, but after looking at source, it does not appear to be adding.  It is fairly straight forward...&#60;br /&#62;
Here is the code I used in functions.  It successfully adds the form to the appropriate single post pages based on the category number the post comes from, but the second part is not working....it is not adding the the header code.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;/** Add a contact form at the end of single posts based on category*/
add_action(&#38;#39;genesis_after_post_content&#38;#39;, &#38;#39;insert_form&#38;#39;);
function insert_form() {
if (is_single() &#38;amp;&#38;amp; in_category(array(1,3,4,5,6,7,10))) {
gravity_form(1, true, true, false, &#38;#39;&#38;#39;, true);
}
}
add_action(&#38;#39;genesis_header&#38;#39;, &#38;#39;insert_form_enqueue&#38;#39;);
function insert_form_enqueue() {
if (is_single() &#38;amp;&#38;amp; in_category(array(1,3,4,5,6,7,10))) {
gravity_form_enqueue_scripts(1, true);
}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;It doesn't work even if I skip the conditional for the enqueue.  Not sure why this isn't working.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Styling messed up when calling form from theme functions file vs. in post itself"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/styling-messed-up-when-calling-form-from-theme-functions-file-vs-in-post-itself#post-31212</link>
			<pubDate>Fri, 29 Jul 2011 17:23:50 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">31212@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;When you add a form using the function call rather than the shortcode, you need to manually enqueue the styles and scripts.&#60;/p&#62;
&#60;p&#62;Please review this FAQ item:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/question/my-forms-styles-arent-being-loaded-properly/&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/question/my-forms-styles-arent-being-loaded-properly/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Billmcq on "Styling messed up when calling form from theme functions file vs. in post itself"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/styling-messed-up-when-calling-form-from-theme-functions-file-vs-in-post-itself#post-31206</link>
			<pubDate>Fri, 29 Jul 2011 15:27:58 +0000</pubDate>
			<dc:creator>Billmcq</dc:creator>
			<guid isPermaLink="false">31206@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;If I insert the form in the post manually from the post editor screen,  the form looks fine.&#60;br /&#62;
If I use the functions file to automatically call the form on singe post pages for certain categories, the same form displays, but styling is a mess.  Now, if I also then manually add the same form in the post editor screen....both forms look fine.    Why is it that the form styling is changing depending on what method the form is being inserted into the post?&#60;/p&#62;
&#60;p&#62;Here is my theme function file:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;/** Add a contact form at the end of single posts based on category*/
add_action(&#38;#39;genesis_after_post_content&#38;#39;, &#38;#39;insert_form&#38;#39;);
function insert_form() {
if (is_single() &#38;amp;&#38;amp; in_category(array(3,4,5,6,7,10))) {
gravity_form(1, false, flase, false, &#38;#39;&#38;#39;, true);
}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and an example page of the issue:&#60;br /&#62;
&#60;a href=&#34;http://www.mcqwebdesign.com/demos/tgpackaging/200/cozzoli-air-cleaner-item-1864/&#34; rel=&#34;nofollow&#34;&#62;http://www.mcqwebdesign.com/demos/tgpackaging/200/cozzoli-air-cleaner-item-1864/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
