一位管理员批准投稿人的帖子后,投稿人将失去编辑帖子的能力。
我想知道如何添加他们编辑帖子的功能,即使在管理员批准或管理员编辑之后。我不想为此使用任何插件。。
您需要添加edit_published_posts
的功能contributor
中的角色functions.php
add_filter(\'init\', function () {
$role = get_role(\'contributor\');
$role->add_cap(\'edit_published_posts\');
});
默认情况下,作者角色提供此功能。否则,您可以使用任何用户角色编辑器插件自定义功能
我不知道如何改变我的孩子主题的功能。php。在woothemes文档中,它说“子主题中的functions.php应该是空的,并且不包括父主题functions.php中的任何内容。”我需要使用此功能来不显示产品类别,但我不确定如何在我的子主题中执行此操作。也许有人能给我提供一些指示?add_action( \'pre_get_posts\', \'custom_pre_get_posts_query\' ); function custom_pre_get_posts_query( $