WP Reference for Logout Page

Hello Friends
Now I am going to introduce how to make a custom logout reference page in your own page.

By Default Code is:

<?php echo wp_logout_url( $redirect ); ?>

Examples are given below-

Default Code is:
<a href=”<?php echo wp_logout_url(); ?>” title=”Logout”>Logout</a>

Logout and Redirect to Current Page

<a href="<?php echo wp_logout_url( get_permalink() ); ?>" title="Logout">Logout</a>

Logout and Redirect to Homepage

<a href=”<?php echo wp_logout_url( home_url() ); ?>” title=”Logout”>Logout</a>

This is the very easy way to add a logout page in your blog. Thanks for reading.
Wait for next tuts.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s