<?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: hooking to the_content AND gform_after_submission?</title>
		<link>https://legacy.forums.gravityhelp.com/topic/hooking-to-the_content-and-gform_after_submission</link>
		<description>Gravity Support Forums Topic: hooking to the_content AND gform_after_submission?</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 20:24:35 +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/hooking-to-the_content-and-gform_after_submission" rel="self" type="application/rss+xml" />

		<item>
			<title>totallyuk on "hooking to the_content AND gform_after_submission?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hooking-to-the_content-and-gform_after_submission#post-211666</link>
			<pubDate>Tue, 16 Apr 2013 11:01:16 +0000</pubDate>
			<dc:creator>totallyuk</dc:creator>
			<guid isPermaLink="false">211666@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;ANYONE!? Please!&#60;/p&#62;
&#60;p&#62;The function above does EXACTLY what I need EXCEPT that I need the wp_query loop to display within the post_content, not immediately after &#38;lt;body&#38;gt;..&#60;/p&#62;
&#60;p&#62;My work so far is bodged together from this example function:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Please help!!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>totallyuk on "hooking to the_content AND gform_after_submission?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hooking-to-the_content-and-gform_after_submission#post-211231</link>
			<pubDate>Tue, 16 Apr 2013 03:42:01 +0000</pubDate>
			<dc:creator>totallyuk</dc:creator>
			<guid isPermaLink="false">211231@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can anyone help with this?? I'm really stuck and am so close to achieving what I need!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>totallyuk on "hooking to the_content AND gform_after_submission?"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/hooking-to-the_content-and-gform_after_submission#post-210355</link>
			<pubDate>Mon, 15 Apr 2013 11:38:35 +0000</pubDate>
			<dc:creator>totallyuk</dc:creator>
			<guid isPermaLink="false">210355@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi guys&#60;br /&#62;
I've got an issue that I can't get my head around..&#60;br /&#62;
I'm using the following function to return a loop of custom posts upon submission of form ID 18:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;quot;gform_after_submission_18&#38;quot;, &#38;quot;set_post_content&#38;quot;, 10, 2);
function set_post_content($entry, $form){

    //getting post
    $post = get_post($entry[&#38;quot;post_id&#38;quot;]);
    $concern = $entry[13];
    $sensitivity = $entry[18];

    $loop = new WP_Query( array(
        &#38;#39;post_type&#38;#39; =&#38;gt; &#38;#39;recommended&#38;#39;,
        &#38;#39;tax_query&#38;#39; =&#38;gt; array(
        &#38;#39;relation&#38;#39; =&#38;gt; &#38;#39;AND&#38;#39;,
        array(
            &#38;#39;taxonomy&#38;#39; =&#38;gt; &#38;#39;concern&#38;#39;,
            &#38;#39;field&#38;#39; =&#38;gt; &#38;#39;slug&#38;#39;,
            &#38;#39;terms&#38;#39; =&#38;gt; $concern
        ),
        array(
            &#38;#39;taxonomy&#38;#39; =&#38;gt; &#38;#39;sensitivity&#38;#39;,
            &#38;#39;field&#38;#39; =&#38;gt; &#38;#39;slug&#38;#39;,
            &#38;#39;terms&#38;#39; =&#38;gt; $sensitivity
        )
        ),
        &#38;#39;orderby&#38;#39; =&#38;gt; &#38;#39;title&#38;#39;,
        &#38;#39;posts_per_page&#38;#39; =&#38;gt; &#38;#39;-1&#38;#39;,
        &#38;#39;order&#38;#39; =&#38;gt; &#38;#39;ASC&#38;#39;
      )
   ); ?&#38;gt;
   &#38;lt;ul&#38;gt;&#38;lt;?php while ( $loop-&#38;gt;have_posts() ) : $loop-&#38;gt;the_post(); ?&#38;gt;
   &#38;lt;li&#38;gt;&#38;lt;?php the_title(); ?&#38;gt;&#38;lt;/li&#38;gt;
   &#38;lt;?php endwhile; ?&#38;gt;&#38;lt;/ul&#38;gt;
   &#38;lt;php
 }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This wp_query loop returns only the posts that have been given terms to the taxomonies &#34;concern&#34; and &#34;sensitivity&#34; that match those chosen by the user from form fields (radio buttons) with IDs 13 and 18..&#60;/p&#62;
&#60;p&#62;The issue is that the loop displays immediately after &#38;lt;body&#38;gt; rather than in the post body.&#60;br /&#62;
I would usually use the hook the_content to put hook into the right place but I can't see how to do this as I'm already using the GF hook : gform_after_submission_18&#60;/p&#62;
&#60;p&#62;Can anyone help? I've been on this most of the day today and I'm not sure if I'm going about it all wrong!?&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Martin
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
