是的,您可以这样做,但要创建像usercp这样的模板。php。
(1) First create usercp.php template and then this one line at first of template.
更新\\u post\\u meta(get\\u the\\u ID(),\'usercp\',111);
(2) Then create page and assign template.
(2) Then go to your functions.php file and add this code
add_action(\'template_redirect\', \'setPrivateTemplate\');
function setPrivateTemplate()
{
if (get_post_meta(get_the_ID(), \'usercp\', true) === 111) {
load_template(dirname(__FILE__) . \'/your-folder-name-inside-theme/usercp.php\');
exit();
}
}