简单PHP网站中的Wordpress主题代码
我有一个 php 网站,在其中我使用了很多 jquery 插件并动态访问另一个数据库以获取页眉和页脚内容。现在我必须添加一个正在检查 wordpress 的博客。我可以创建主题,但无法从其他数据库访问页眉和页脚动态内容。在我的简单 php 页面中是否有其他方法可以访问 wordpress 主题循环和其他主题功能?如果没有,那么请建议在网站中添加其他简单的 php 博客脚本并提供 SEO 支持。
谢谢
I have a php website, in which I have used a lot of jquery plugins and accessing another database for header and footer contents dynamically.Now I have to add a blog for which I am checking wordpress. I can create the theme, but cannot access the header and footer dynamic contents from other DB. Is there some other to access the wordpress theme loop and other theme functions in my simple php pages? If no then any suggestion about other simple php blog script to add in the website with SEO support please.
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以根据需要使用 include() 或 require() 在 WordPress 模板中包含文件。只需将 PHP 文件与模板文件放在一起就可以了。
如果您的旧网站现在位于模板文件夹中,您可以通过以下方法完全放弃 WordPress 并显示旧网站中的某些内容:
You can include files as you wish in a Wordpress template using include() or require(). Just put your PHP files with your template files and you should be good to go.
Here's how you can forego Wordpress entirely and display something from your old website, if your old website now lives inside of your template folder: