Force WordPress user to logout after inactivity

Posted in Web Development on 06.10.2015 by @chasebadkids

You can use the following snippet to force the end user to logout after a period of inactivity.

Simply update the amount of time In this example 600) to the amount of seconds you want to go with before forcing the user to log out.