<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>Peter&#039;s Useful Crap - Topic: logout redirect to last visited page.</title>
	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page</link>
	<description><![CDATA[Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more]]></description>
	<generator>Simple:Press Version 5.5.1</generator>
	<atom:link href="http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Peter on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p3180</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p3180</guid>
        	        	<description><![CDATA[<p>Thanks a lot for sharing, Filip!  I've left this functionality out of the core on purpose because of the variety of ways people customize their login forms and because you can extend this plugin with the code that you've shared:</p>
<p><a href="http://wordpress.org/extend/plugins/peters-login-redirect/other_notes/" rel="nofollow"><a href="http://wordpress.org/extend/pl" rel="nofollow">http://wordpress.org/extend/pl</a>.....her_notes/</a></p>
]]></description>
        	        	<pubDate>Wed, 25 Jul 2012 10:22:49 +0000</pubDate>
        </item>
        <item>
        	<title>filip on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p3179</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p3179</guid>
        	        	<description><![CDATA[<p>Stefano,<br />
iI exactly needed that.</p>
<p>In simplemodal-login.php line 370 place:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit2204" value="Select Code" onclick="spjSelectCode('sfcode2204');" /></p>
<div class="sfcode" id="sfcode2204">
&#60;input type=&#34;hidden&#34; name=&#34;referer&#34; value=&#34;'. $_SERVER[&#34;REQUEST_URI&#34;] . '&#34; /&#62;
</div>
<p>and to line 455 place:</p>
<p><input type="button" class="sfcodeselect" name="sfselectit7745" value="Select Code" onclick="spjSelectCode('sfcode7745');" /></p>
<div class="sfcode" id="sfcode7745"> if ($redirect_to == &#34;referer&#34;)<br />
	$redirect_to = $_POST['referer'];
</div>
<p>In admin interface in the URL redirection type "referer".</p>
<p>Peter, wouldnt it be a nice improvement of your cool plugin?</p>
<p>Cheers,<br />
Filip</p>
]]></description>
        	        	<pubDate>Wed, 25 Jul 2012 10:14:29 +0000</pubDate>
        </item>
        <item>
        	<title>stefano on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p3011</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p3011</guid>
        	        	<description><![CDATA[<p>Hi,<br />
I would like users be redirected to the last visited page after they login or logout. Shall I use this funtion    ?<br />
And in which php file shall I paste it?</p>
<p>Regards</p>
<p>Stefano</p>
]]></description>
        	        	<pubDate>Sun, 25 Mar 2012 09:59:13 +0000</pubDate>
        </item>
        <item>
        	<title>Dave Pitman on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2977</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2977</guid>
        	        	<description><![CDATA[<p>I cobbled together a slightly more useful function for using in page templates.</p>
<p><input type="button" class="sfcodeselect" name="sfselectit4106" value="Select Code" onclick="spjSelectCode('sfcode4106');" /></p>
<div class="sfcode" id="sfcode4106">&#60;?php wp_loginout(get_permalink()); ?&#62;</div>
<p>Thanks for giving it some thought and recommendation.</p>
]]></description>
        	        	<pubDate>Sat, 25 Feb 2012 23:53:11 +0000</pubDate>
        </item>
        <item>
        	<title>Peter on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2976</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2976</guid>
        	        	<description><![CDATA[<p>Hi Dave,</p>
<p>The example you posted might be your best bet -- not putting the logic in functions.php but rather editing your theme template and making the logout link dynamic.</p>
]]></description>
        	        	<pubDate>Sat, 25 Feb 2012 22:04:05 +0000</pubDate>
        </item>
        <item>
        	<title>Dave Pitman on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2975</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2975</guid>
        	        	<description><![CDATA[<p>Hmmm. It seems that it is not as simple to have a global redirect to the previous visited page as it is to an absolute url.</p>
<p>I played around with using "$_SERVER['HTTP_REFERER']" as the value, but, no joy.</p>
<p>The WP-Codex gives the example of</p>
<p><input type="button" class="sfcodeselect" name="sfselectit4615" value="Select Code" onclick="spjSelectCode('sfcode4615');" /></p>
<div class="sfcode" id="sfcode4615">&#60;a href=&#34;&#60;?php echo wp_logout_url( get_permalink() ); ?&#62;&#34; title=&#34;Logout&#34;&#62;Logout&#60;/a&#62;`</div>
<p> for this purpose, but no examples of how to use this within functions.php rather than on a page template.</p>
<p>Can this or something else be adapted to apply this global logout redirect?</p>
<p>Thanks Peter, I apologize for what must be basic 'crap' for you! <img class="sfsmiley" src="http://www.theblog.ca/wp-content/forum-smileys/sf-smile.gif" alt="Smile" /></p>
]]></description>
        	        	<pubDate>Sat, 25 Feb 2012 13:41:54 +0000</pubDate>
        </item>
        <item>
        	<title>Peter on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2973</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2973</guid>
        	        	<description><![CDATA[<p>I usually recommend seeing this comment for ideas, as there are a few ways to handle that on login and logout:</p>
<p><a href="http://www.theblog.ca/wplogin-redirect#comment-11089" rel="nofollow"><a href="http://www.theblog.ca/wplogin-" rel="nofollow">http://www.theblog.ca/wplogin-</a>.....ment-11089</a></p>
]]></description>
        	        	<pubDate>Sat, 25 Feb 2012 12:31:04 +0000</pubDate>
        </item>
        <item>
        	<title>Dave Pitman on logout redirect to last visited page.</title>
        	<link>http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2972</link>
        	<category>Peter's Login Redirect</category>
        	<guid isPermaLink="true">http://www.theblog.ca/peter-forum/peters-login-redirect/logout-redirect-to-last-visited-page#p2972</guid>
        	        	<description><![CDATA[<p>To use a function instead of a plugin, I found this code attributed to Peter.</p>
<p><input type="button" class="sfcodeselect" name="sfselectit8905" value="Select Code" onclick="spjSelectCode('sfcode8905');" /></p>
<div class="sfcode" id="sfcode8905">function redirect_logout_home_page() {<br />
wp_redirect(get_option('home'));<br />
die();<br />
}</p>
<p>add_action('wp_logout', 'redirect_logout_home_page'); </p>
</div>
<p>This works fine to redirect to the home page.</p>
<p>Can you share how to edit this to redirect to the last page the visitor was on when they chose to log-out.</p>
<p>Thank You!</p>
]]></description>
        	        	<pubDate>Sat, 25 Feb 2012 11:55:06 +0000</pubDate>
        </item>
</channel>
</rss>