Redirect user if they are logged in

I was very happy with the above logic and just needed it slightly changed. Adding a ! before is_user_logged_in() solved my issue completely and allowed me to do the logic in reverse. /**********************************START************************************* ********** Redirect account page to login page if user is logged In ********* ****************************************************************************/ add_action( ‘template_redirect’, function() { if ( ! is_user_logged_in() … Read more

301 Redirects from old WordPress domain

You didn’t mention what http server you are using so I’ll assume it is either Apache or Nginx. Apache The most efficient method would be to include a “redirect” statement within the block; <VirtualHost your_ip_address:80> ServerName example.com ServerAlias www.example.com Redirect 301 / https://example.ro/ </VirtualHost> By doing it within your httpd.conf the work is done prior … Read more