600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > wordpress简捷按钮_通过在WordPress帖子中添加快速编辑按钮来节省时间

wordpress简捷按钮_通过在WordPress帖子中添加快速编辑按钮来节省时间

时间:2021-03-15 23:00:08

相关推荐

wordpress简捷按钮_通过在WordPress帖子中添加快速编辑按钮来节省时间

wordpress简捷按钮

Have you ever made a mistake in your old WordPress posts and realized it when your user emailed you 4 months later? If you have, then you would normally have to go through the WordPress admin panel, search that post and edit it. This obviously takes a lot of time which can be saved by a Quick Edit link in each post page. Majority of the top themes have this included, but there are still theme designers that fail to include this simple feature in a theme. In this article, we will show you how you can add a quick edit button in your WordPress posts and comments.

您是否曾经在旧的WordPress帖子中犯过一个错误,并在4个月后用户通过电子邮件向您发送电子邮件时意识到了这一错误? 如果有的话,通常就必须通过WordPress管理面板,搜索该帖子并进行编辑。 显然,这需要花费很多时间,每个帖子页面中的快速编辑链接可以节省这些时间。 大多数顶级主题都包含此功能,但是仍然有主题设计人员未能在主题中包含此简单功能。 在本文中,我们将向您展示如何在WordPress帖子和评论中添加快速编辑按钮。

在WordPress帖子中添加快速编辑按钮 (Adding a Quick Edit Button to WordPress Posts)

Simply open your theme’ssingle.phpfile and add this post anywhere inside the loop. Don’t worry, this will only be shown to users that have specific permissions. Average user will not see this button.

只需打开主题的single.php文件,然后在循环内的任何位置添加此帖子即可。 不用担心,这只会显示给具有特定权限的用户。 一般用户不会看到此按钮。

<?php edit_post_link(__('{Quick Edit}'), ''); ?>

<?php edit_post_link(__('{Quick Edit}'),''); ?>

在WordPress注释中添加快速编辑按钮 (Adding a Quick Edit Button to WordPress Comments)

By default this code is added in the WordPress comments.php file, but if you don’t have the functionality, then add the following code:

默认情况下,此代码添加在WordPress comment.php文件中,但是如果您没有此功能,则添加以下代码:

<?php edit_comment_link(__('{Quick Edit}'), ''); ?>

<?php edit_comment_link(__('{Quick Edit}'),''); ?>

By adding these codes, a Quick Edit link will be displayed on your post page, so you can simply edit the post with one click rather than searching the wp-admin panel for editing.

通过添加这些代码,“快速编辑”链接将显示在您的帖子页面上,因此您只需单击一下即可简单编辑帖子,而无需搜索wp-admin面板进行编辑。

翻译自: /wp-themes/save-time-by-adding-a-quick-edit-button-in-wordpress-posts/

wordpress简捷按钮

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。