<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Topic Shortcode redirecting question - How-to and Troubleshooting				            </title>
            <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/</link>
            <description>Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Sun, 15 Mar 2026 22:54:18 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/paged/2/#post-104479</link>
                        <pubDate>Tue, 15 Aug 2023 07:06:49 +0000</pubDate>
                        <description><![CDATA[@nolan59,
Thank you for sharing your solution.]]></description>
                        <content:encoded><![CDATA[<p>@nolan59,</p>
<p>Thank you for sharing your solution.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>Robert</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/paged/2/#post-104479</guid>
                    </item>
				                    <item>
                        <title>RE: Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/paged/2/#post-104470</link>
                        <pubDate>Mon, 14 Aug 2023 09:52:58 +0000</pubDate>
                        <description><![CDATA[I have found a way to do it.The function to edit is in the wpforo/classes/Actions.php file.Search for : public function post_add()and replace the whole function with this :
public function ...]]></description>
                        <content:encoded><![CDATA[<p>I have found a way to do it.<br /><br />The function to edit is in the wpforo/classes/Actions.php file.<br />Search for : public function post_add()<br /><br />and replace the whole function with this :<br /><br /></p>
<pre contenteditable="false">public function post_add() {
	wpforo_verify_form();
	$args = $_REQUEST;
	$args = (array) wpfval( $_REQUEST, 'data' );

	$from = wpforo_get_request_uri();
	$isForumPage = strpos( $from, '/community/' ) !== false;

	if( $postid = WPF()-&gt;post-&gt;add( $args ) ) {
		if ( $isForumPage ) {
			wp_safe_redirect( WPF()-&gt;post-&gt;get_url( $postid ) );
		} else {
			wp_safe_redirect( $from );
		}
		exit();
	}
	wp_safe_redirect( $from );
	exit();
}</pre>
<p><br /><br />Replace /community/ with your board slug if you have changed it</p>
<p>Hopefully somebody with a better knowledge of the WPForo code can modify this so that it will work regardless of what your board is called or how many boards you have, but if you have a vanilla installation, this will do the trick.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>nolan59</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/paged/2/#post-104470</guid>
                    </item>
				                    <item>
                        <title>RE: Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104451</link>
                        <pubDate>Sun, 13 Aug 2023 00:42:24 +0000</pubDate>
                        <description><![CDATA[actually there is an easy way for it to work like this and all it will take is adding one or two lines of code to do it.When the reply form is sent, Wordpress adds a hidden field called &quot;_wp...]]></description>
                        <content:encoded><![CDATA[<p>actually there is an easy way for it to work like this and all it will take is adding one or two lines of code to do it.<br /><br />When the reply form is sent, Wordpress adds a hidden field called "<span>_wp_http_referer" which contains the current page url. Wordpress uses this to do security checks.<br /><br />The WPForo shortcode could also read this hidden field and use it to direct the user back to the page they were on instead of the forum topic as it currently does.<br /><br />If there is anybody that knows the code and can point me to the file that processes the form, I could add the redirect into my forum's file.</span></p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>nolan59</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104451</guid>
                    </item>
				                    <item>
                        <title>RE: Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104376</link>
                        <pubDate>Wed, 09 Aug 2023 14:15:31 +0000</pubDate>
                        <description><![CDATA[@nolan59,
The whole forum system is connected to the one root path /community/ or whatever you&#039;ve changed it. This is like a tree, it can only have one root, there is no way to create root ...]]></description>
                        <content:encoded><![CDATA[<p>@nolan59,</p>
<p>The whole forum system is connected to the one root path /community/ or whatever you've changed it. This is like a tree, it can only have one root, there is no way to create root for each branch of the tree, you can display branches in different frames (pages) but you cannot cut it from the tree. So there is no way to have stand-alone working topic page. </p>
<p>You can create a new tree (<a href="https://wpforo.com/docs/wpforo-v2/categories-and-forums/forum-boards/" target="_blank" rel="noopener">board</a>) with its own root in a separate page. But this will be a fully separate forum with it's categories and topics.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>Robert</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104376</guid>
                    </item>
				                    <item>
                        <title>RE: Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104373</link>
                        <pubDate>Wed, 09 Aug 2023 09:37:53 +0000</pubDate>
                        <description><![CDATA[Thank you for the reply Robert. I appreciate the help. 😀 That&#039;s odd as embed topic shortcode also shows the user a reply box so you would think that the embedded topic would return the user ...]]></description>
                        <content:encoded><![CDATA[<p>Thank you for the reply Robert. I appreciate the help. 😀 <br /><br />That's odd as embed topic shortcode also shows the user a reply box so you would think that the embedded topic would return the user back to the same page after a reply.<br /><br />Do you think I could achieve that by using the</p>
<ul>
<li>'wpforo_after_add_post' - args: (array)$post, (array)$topic</li>
</ul>
<p>hook?</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>nolan59</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104373</guid>
                    </item>
				                    <item>
                        <title>RE: Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104358</link>
                        <pubDate>Tue, 08 Aug 2023 14:42:45 +0000</pubDate>
                        <description><![CDATA[Hi @nolan59,
Please read this topic, the shortcode pages are not a standalone forum pages, the shortcodes are only designed to display a certain topic not to create a separate forum:]]></description>
                        <content:encoded><![CDATA[<p></p>
<p>When you reply to the topic you are however returned to the topic on the Forum and now the page you replied on.</p>
<p>Is there a way to return the member back to the original page instead of bumping them back to the forum each time?</p>
<p></p>
<p>Hi <span>@nolan59</span>,</p>
<p>Please read this topic, the shortcode pages are not a standalone forum pages, the shortcodes are only designed to display a certain topic not to create a separate forum: https://wpforo.com/community/postid/43746/</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>Robert</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104358</guid>
                    </item>
				                    <item>
                        <title>RE: Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104319</link>
                        <pubDate>Sat, 05 Aug 2023 00:41:35 +0000</pubDate>
                        <description><![CDATA[Seems like I am the only one adding a topic to an external page 😪]]></description>
                        <content:encoded><![CDATA[<p>Seems like I am the only one adding a topic to an external page 😪 </p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>nolan59</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104319</guid>
                    </item>
				                    <item>
                        <title>Topic Shortcode redirecting question</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104225</link>
                        <pubDate>Fri, 28 Jul 2023 02:45:57 +0000</pubDate>
                        <description><![CDATA[First post here so hi 😀 
I am busy converting my site to work on WPForo from SMF, so lot&#039;s of work ahead lol, but enjoying WPForo so far.I have added this shortcode to a page : All is great...]]></description>
                        <content:encoded><![CDATA[<p>First post here so hi 😀 </p>
<p>I am busy converting my site to work on WPForo from SMF, so lot's of work ahead lol, but enjoying WPForo so far.<br /><br />I have added this shortcode to a page : <br /><br />All is great, the topic shows on the page along with existing replies and  the editor to add a reply.</p>
<p>When you reply to the topic you are however returned to the topic on the Forum and now the page you replied on.</p>
<p>Is there a way to return the member back to the original page instead of bumping them back to the forum each time?</p>
<p>Thanks for the advice in advance.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting</category>                        <dc:creator>nolan59</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/topic-shortcode-redirecting-question/#post-104225</guid>
                    </item>
							        </channel>
        </rss>
		