When first clicking the log out link the URL will be like 'domain/wp-login.php?action=logout&redirect_to=%24index.php&_wpnonce=265159f618' which is on the page where it says 'You are attempting to log out of X. Do you really want to log out?'. Once confirmed I am taken to 'domain.com/wp-login.php?loggedout=true', no matter what I do.
I really can't see where I am going wrong! My log out link is:
<a href="<?php echo wp_logout_url('$index.php'); ?>" title="Logout">Logout</a>
Any help would really be appreciated,