MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

How does WordPress replace the default home page after login

Source: Shangpin China | Type: website encyclopedia | Date: April 7, 2012
Beijing website construction Company Shangpin China: The "dashboard" page that is displayed by default after WordPress logs in, that is, the "dashboard" page previously mentioned, in fact, this "dashboard" page is really of little practical significance. Now I want to directly display the "all articles" page (or any page in the background) after logging in. What should I do? The following content can also be regarded as answering the questions of netizens.

In fact, the operation is also very simple. Use a text editor to open functions.php under the current theme directory, and add the following php code at the end:

function my_login_redirect(redirect_to,$request)

if(empty(redirect_to )|| $redirect_to == 'wp-admin/' || $redirect_to == admin_url())

return home_url("/wp-admin/edit.php");

else

return $redirect_to;

}

add_filter("login_redirect", "my_login_redirect", 10, 3);

In line 10,/wp admin/edit.php is the address of the background page to jump to after login. It is set as all article pages. If you want to jump to the article writing page after login, you can change it to/wp admin/post new. php, and so on.

Note: If your WordPress is installed in a subdirectory, such as the wp directory, then the address in line 10 should be added with a subdirectory, such as/wp/wp admin/edit.php

This article was published on Beijing website production Company Shangpin China //ihucc.com/
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]