{"id":4528,"date":"2022-04-04T13:06:30","date_gmt":"2022-04-04T10:06:30","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?post_type=documentation&amp;p=4528"},"modified":"2022-04-04T13:06:30","modified_gmt":"2022-04-04T10:06:30","slug":"successful-login-redirection-with-account-modal","status":"publish","type":"documentation","link":"https:\/\/creativethemes.com\/blocksy\/docs\/code-snippets\/successful-login-redirection-with-account-modal\/","title":{"rendered":"Redirect users after logging in with account modal"},"content":{"rendered":"\n<p>Many users have asked us to provide a way of redirecting users after they have successfully logged in using the account header modal. Here&#8217;s a little PHP filter that can help you achieve just that!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Redirecting to homepage<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter('blocksy:account:modal:login:redirect_to', function ($url) {\n return home_url();\n});<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Redirecting to custom page<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>add_filter('blocksy:account:modal:login:redirect_to', function ($url) {\n return home_url() . '\/contact-us\/';\n});<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many users have asked us to provide a way of redirecting users after they have successfully logged in using the account header modal. Here&#8217;s a little PHP filter that can help you achieve just that! Redirecting to homepage Redirecting to custom page<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"doc_categories":[125],"class_list":["post-4528","documentation","type-documentation","status-publish","hentry","doc_categories-code-snippets"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/4528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/documentation"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=4528"}],"version-history":[{"count":0,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/4528\/revisions"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=4528"}],"wp:term":[{"taxonomy":"doc_categories","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/doc_categories?post=4528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}