{"id":680,"date":"2014-08-07T02:35:59","date_gmt":"2014-08-07T02:35:59","guid":{"rendered":"https:\/\/docs.wpgeodirectory.com\/?p=680"},"modified":"2017-03-16T13:48:29","modified_gmt":"2017-03-16T13:48:29","slug":"redirecting-the-login-page","status":"publish","type":"post","link":"https:\/\/wpgeodirectory.com\/docs\/redirecting-the-login-page\/","title":{"rendered":"Redirecting the login or registration page"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>On this page we&#8217;ll explain how to integrate your GeoDirectory with some other plugins that use the WordPress user accounts.<\/p>\n<ul>\n<li><a href=\"#intro\">Introduction<\/a><\/li>\n<li><a href=\"#login\">Redirecting your login<\/a><\/li>\n<li><a href=\"#register\">Redirecting your registration<\/a><\/li>\n<li><a href=\"#integration\">Adjust for your particular integration<\/a>\n<ul>\n<li><a href=\"#woocommerce\">WooCommerce<\/a><\/li>\n<li><a href=\"#bbpress\">bbPress, s2Member etc<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"intro\"><\/a>Introduction<\/h3>\n<ol>\n<li>By default GD will add its <a href=\"https:\/\/wpgeodirectory.com\/docs\/layout\/#other\">own registration and login page<\/a>.<\/li>\n<li>But you may want to redirect either the login and\/or registration links to\u00a0other pages, for example because you are using a membershipp plugin.<\/li>\n<li>You can add the following code snippets to your child theme&#8217;s <em><strong>functions.php<\/strong><\/em> or use the <a href=\"https:\/\/wpgeodirectory.com\/docs\/useful-plugins\/#snippets\">code snippets plugin<\/a>.<\/li>\n<\/ol>\n<h3><a id=\"login\"><\/a>1. Redirecting your login<\/h3>\n<p>[php]add_filter(&#8216;geodir_login_url&#8217;,&#8217;change_geodir_login_url&#8217;,10,3);<br \/>\nfunction change_geodir_login_url($login_url,$args,$gd_page_id){<br \/>\n\/\/change the url to whatever you want.<br \/>\n$login_url = &#8216;http:\/\/your-site.com\/my-login-page&#8217;;<br \/>\nreturn $login_url;<br \/>\n}[\/php]<\/p>\n<h3><a id=\"register\"><\/a>2. Redirecting your registration<\/h3>\n<p>[php]add_filter(&#8216;geodir_login_url&#8217;,&#8217;_my_geodir_login_url&#8217;,10,3);<br \/>\nfunction _my_geodir_login_url($login_url,$args,$gd_page_id){<br \/>\n if(isset($args[&#8216;signup&#8217;])){<br \/>\n\/\/change the url to whatever you want.<br \/>\n $login_url = &#8216;http:\/\/your-site.com\/my-rego-page&#8217;;<br \/>\n }<br \/>\nreturn $login_url;<br \/>\n}[\/php]<\/p>\n<h3><a id=\"integration\"><\/a>3. Adjust for your particular integration<\/h3>\n<p>In the code above you&#8217;ll see we are redirecting <em><strong>geodir_signup<\/strong><\/em> to <em><strong>\/wp-login.php<\/strong><\/em><\/p>\n<p>The page it is redirecting to might have to be adjusted for your situation.<\/p>\n<h4><a id=\"woocommerce\"><\/a>WooCommerce<\/h4>\n<p>A standard installation of WooCommerce creates a shopper&#8217;s account page at <em><strong>\/my-account<\/strong><\/em>.<\/p>\n<p>You would change the above code to<\/p>\n<p>[php]$login_url = &#8216;http:\/\/your-site.com\/my-account&#8217;;[\/php]<\/p>\n<h4><a id=\"bbpress\"><\/a>bbPress, s2Member etc<\/h4>\n<p>The code above will work to by-pass GD&#8217;s registration and login process for all plugins that use the standard WP login, like:<\/p>\n<ul>\n<li>bbPress<\/li>\n<li>s2Member<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; On this page we&#8217;ll explain how to integrate your GeoDirectory with some other plugins that use the WordPress user accounts. Introduction Redirecting your login Redirecting your registration Adjust for your particular integration WooCommerce bbPress, s2Member etc Introduction By default GD will add its own registration and login page. But you may want to redirect &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpgeodirectory.com\/docs\/redirecting-the-login-page\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Redirecting the login or registration page&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1676,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/680"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/users\/1676"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/comments?post=680"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/680\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/media?parent=680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/categories?post=680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/tags?post=680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}