Redirect log in

Posted in: Newspaper
Post count: 8

Hi,

I have used Newspaper theme for my website.
my website link : ( http://www.bloggeravisen.no/ )

At the top of the header of the theme (in front page) has “Sign in / Join” option for login.
when click “Sign in / Join” a popup form appear for login.

After login I want to redirect the page : ” http://www.bloggeravisen.no/account/

Thats why I have edit the “tagdiv_theme.js” file.
(../wp-content/themes/Newspaper/js/tagdiv_theme.js)

written the js code

window.location.replace(“http://www.bloggeravisen.no/account/”);

insted of:

location.reload( true );

here is the screenshot link of the code:

https://drive.google.com/file/d/0B_FgPq8csWr5TmZUZnU3LV9KNlk/view

The code doesn’t work at my server it do not redirect me to (“http://www.bloggeravisen.no/account/”)
after login.

But in Localhost it working and redirect me the page.

Hope you can help.

Post count: 22421

Hello,

Please use this guide on how you can create 301 redirects:
http://www.wpbeginner.com/plugins/how-to-quickly-redirect-post-page-wordpress/

I hope this helps.

Post count: 8

Hello Bogdan,

Thank you on our replay.
301 redirect directly redirectly us to another page.
But here when we logged in from my home page, after login we redirect to another page.” It can’t be done using the plugin, it is the best way if I can do it by editing the theme js code.

Best regards
Kenan

Post count: 6600

Hi,

It seems location.href also works: https://www.screencast.com/t/A5KFDKgZ try it and also check your htaccess file you may have restrictions on your live site.

Hope this helps!
Lucian C.

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.