Articles of redirect

Using filter for plugin so redirection goes to previous page viewed after login

I am using the plugin called Clean Login and I am trying to use this filter (see below) in order to make it so that after a person logs in, the page that they were previously viewing before they logged in is then displayed again. I have created a “child” version of the Clean-login plugin […]

Redirection to last page visited before login

If a link can only be visited when a user is logged in, if the user clicks on the link and is the redirected to the login page. How do I redirect the user back to the page of the link that was initially clicked on in wordpress ?

How to redirect to home page after registration?

I am using wordpress 4.6. I have template register form with page URL domain-name/account/?action=register I want to redirect it to home page after register but instead of that it show message “You have logged in. You better go to Home” with page URL domain-name/account/?result=registered. I already try below code in theme functions.php function __my_registration_redirect(){ wp_redirect( […]

Specific Content on pages based on user

I have a page on my site and would like to show different content on this paged based on who is logged in. If the user isn’t logged in, show the login form or if the user is logged in but does not have access, then show a message stating so. I have tried “User […]

I have cloudflare flexible enabled, How to redirect to https for Nginx server

If I access directly to https it works, but the site is still accessible by HTTP. How do I force all http to https? I have used WordPress HTTPS plugin. But it is not redirect to https. I have configured the nginx with following: server { listen xxx.x.xxx.xxx:80; listen 127.0.0.1:80; server_name mydomain.com; root /var/www/html/mydomian.com/; index […]

Unable to link CSS file

I use this to link to my CSS file: $css_file = plugin_dir_path( __FILE__ ) . ‘MapStyle.css’; echo ‘<link rel=”stylesheet” href=”‘, $css_file, ‘” >’; Which (correctly) resolves as (echo $css_file): /var/www/mysite/wp-content/plugins/TheMapPlugin/MapStyle.css But the css file is never loaded, because the browser is looking for the file: http://www.example.com/var/www/mysite/wp-content/plugins/TheMapPlugin/MapStyle.css What am I overlooking here? All help appreciated!

woocommerce shop page Redirect Help

How can I redirect my wordpress shop page from. www.domain.com/shop to shop.domain.com. Please help Also my site has been adding deleted products to my customers orders. They are not being charged for the deleted orders, but the orders showing up on their receipts is causing alot of confusion. Thank you!

Login With Ajax – First Time Login Redirect to Profile Page

I’m using the Login With Ajax plugin. I’m trying to, on the first login ONLY, redirect to the profile page. After the first login and submitting of the profile form, next login, redirect to the dashboard. In login-with-ajax.php I commented out $redirect = self::getLoginRedirect(self::$current_user); since this is using the Login with Ajax setting in admin […]

Conditional redirect on login using referring URL

My clients site has a form only viewable to people that have a specific user role (custom). They are sending out a link to an RSVP page but in order to view that page the visitor must be registered with the site or logged in. The problem I’m running into is that if they have […]

Unable to log in as admin

Since today I’m unable to log in my website as admin, there is always a toolbox at the top of the site but it just shows some useless information. Adding /wp-login in my URL works, the IDs work and it redirects to my website with the same state of non-admin. /wp-admin says I don’t have […]