WordPress Post - 密码保护&摘抄
是 wordpress 的新手..我已经安装了它的版本 3.1.1..
我只是想知道如何使帖子受密码保护 以及如何添加它的摘录......?
am newbie in wordpress.. I have installed its version 3.1.1..
I just want to know how can I make the post password protected
and how to add excerpt for it....?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
假设您指的是 WordPress 3.1.1,那么答案是在您撰写帖子的页面上有一个可以输入摘录的位置。您可以在此处的 WordPress Codex 中阅读更多信息:http://codex.wordpress.org/Excerpt
关于密码保护,您可以将帖子设置为受密码保护或私密(不同的事情)。在标准 WP 安装中,页面右上角附近有一个“发布”面板来控制此操作。以下是文档: http://codex.wordpress.org/Content_Visibility
提供更复杂的密码保护选项通过插件。
Assuming you mean WordPress 3.1.1, then the answer is that on the page where you author a post there is a place to enter an excerpt. You can read more in the WordPress codex here: http://codex.wordpress.org/Excerpt
Regarding password protection, you can make a post password protected or private (different things). In a standard WP installation there is a "Publish" panel near the top right of the page that controls this. Here is the documentation: http://codex.wordpress.org/Content_Visibility
More sophisticated password protection options are available via plugins.
我正在寻找一种解决方案,使摘录在受密码保护的帖子中可用,但我只找到 这种旧的/不起作用的方式,所以我通过将此代码添加到您的主题functions.php中来制作自己的
方式绕过过滤器“get_the_excerpt”,该过滤器不会在帖子被使用时应用密码保护。
如果您还需要在内容之前显示摘录,您可以这样做:
I was looking for a solution to make the excerpt available in a password protected post and I've found only this old / not working way, so I made my own by adding this code to your theme functions.php
this way you are bypassing the filter "get_the_excerpt" that it's not used applied in case the post is password protected.
If you also need to display the excerpt before the content you can do this: