WordPress 帖子除了无法与主题框架正常工作之外
在父主题的支持论坛中遇到与此人相同的问题...... http://themeshaper.com/forums /topic/excerpt-on-front-page-childtheme_override_content_init-never- Called#post-16836
我在这里问是因为似乎没有人能够帮助他。
如果有人非常了解 WordPress,并且以前处理过主题框架,我们将不胜感激您的帮助。
提前致谢。
Getting the same problem as this guy in the support forum for the parent theme...
http://themeshaper.com/forums/topic/excerpt-on-front-page-childtheme_override_content_init-never-called#post-16836
I ask here because no one seemed to be able to help him.
If anyone understands wordpress quite well, and has dealt with the thematic theme framework before, your help would be appreciated.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果
childtheme_override_content_init()
已存在于其他位置,则您无法“覆盖”它。您可以通过在 single.php 中添加以下代码行来检查该函数是否存在:
如果打印 TRUE 则该函数存在,则它将不起作用。在这种情况下,您有 2 个选择。删除原始函数或将其更改为您期望的行为。
检查框架是否有任何可用于修改函数行为的 Hook,这样您就不必更改或删除原始函数。
If a
childtheme_override_content_init()
already exists in some other place, you can't 'override' it.You can check if the function exists by adding this line of code in your single.php:
If it prints TRUE the function exists, it won't work. In this case you have 2 options. Delete the original function or change it to behave as you expect.
Check out if the framework have any Hooks that can be used to modify the behavior of the function so you don't have to change or delete the original function.
经过几个小时的工作解决了这个问题。我不认为仅仅因为我已经花了几个小时在这上面并询问了堆栈,我就应该放弃尝试。
引用问题中提供的链接中我的帖子...
Solved this after many hours working. I don't believe just because I have already spent hours on it and asked on stack, that I should simply give up trying.
Quote from my post at the link provided in the question...