Once a member is logged in, we need a way for them to log out. You can accomplish this in several different ways.
Deﬁning the log out page
The ﬁrst thing to do is deﬁne which page members are sent to immediately after logging out. You can use any page or post on your site, but often times the Login page is a good choice. Once you decide on the appropriate page, navigate to that page in the WordPress admin panel and create a custom ﬁeld: Name: cart66_member Value: logout
This custom ﬁeld tags the selected page as the page where the member will land right after logging out. If you do not deﬁne this page, Cart66 will send the member to your site’s home page. Note that you do not want to pick your Log Out page as the page where you put this custom ﬁeld.
Log out using the
When a member is already logged in, the
account_login] shortcode provides a welcome statement followed by a link to log out. It is common to use this shortcode in the My Account page.
Log out using a log out page
If your theme uses the WordPress 3.0 menu system then this is probably the option you will want to use for setting up your log out page.
Step 1: Create a new Log Out page in your WordPress admin
Step 2: Add the [account_logout] shortcode to your Log Out page.
Step 3: Create a custom ﬁeld that deﬁnes this page as being a private page which means it will only appear in the navigation if the member is already logged in. Name: cart66_access Value: private. Be sure that you do not require any feature levels for this page. You want people to be able to log out whether they have an active subscription or not.
Step 4: Publish your Log Out page so that is available in the list of WordPress pages.
Step 5: If the Log Out page does not appear in your navigation menu, go to the WordPress 3.0 Menu manager under Appearance –> Menus and add your new Log Out page to one of your Menus. Click Save Menu to save your changes.
Step 6: If you haven’t deﬁned this already, be sure to setup a page where members will be redirected after logging out. You may want this to be your Login page, your site’s home page, or some other public page of your website. Decide which page you want to use, then add the custom ﬁeld: Name: cart66_member Value: logout Note that you do not want to pick your Log Out page as the page where you put this custom ﬁeld. It is common to choose your Login page.