WordPress 静态主页和置顶帖子摘录
我尝试了几件事,但由于某种原因,当我选择静态主页时,我无法显示粘性摘录。
显示的摘录是静态主页的摘录。
有谁知道该怎么做吗?
预先感谢,
彼得
I tried several things but for some reason i'm not able to show sticky excerpts when i choose a static homepage.
The excerpt that is shown is the excerpt of the static homepage.
Does any body know how to do this?
Thanks in advance,
Peter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这其实很难无中生有。
我会调查一下:
在阅读选项面板中,您是否在帖子下拉列表中分配了静态页面,如果没有,则应该这样做,它应该可以解决您的问题!
如果您使用自定义模板文件,那么您是否使用自定义 wp 查询?如果您在不使用自定义查询的情况下启动循环,则默认行为是从分配了模板的页面返回内容。
如果您找不到解决方案,请添加更多详细信息。
编辑:这个链接很好地解释了它
This is actually hard to tell out of nothing.
I would look into this:
In the reading option panel, did you assign the static page in the posts dropdown, if not do so and it should fix your issue !
If you are using a custom template file, are you using a custom wp query ? If you are starting a loop without using a custom query, the default behavior is to return content from the page whose the template is assigned to.
Please add more details if you can't find a solution.
edit: this link explains it nicely
尝试我想出的解决方案 - 使便签在 WP 中粘在任何地方,甚至是管理员。
http://interconnectit.com/2146/如何在 wordpress 中制作粘性帖子甚至粘性/
Try the solution I came up with - makes stickies sticky literally everywhere in WP, even admin.
http://interconnectit.com/2146/how-to-make-sticky-posts-even-stickier-in-wordpress/