在 WordPress Post 中执行 php 代码
我需要
在 WordPress 帖子中编写一些 php 代码,我在这个 http://www.hongkiat.com/blog/execute-php-in-wordpress-post-page-and-widget-sidebar/ 使用 phpexec 插件。
但是老问题就像我在 html 编辑器和可视化(所见即所得)编辑器之间切换一样,它也会改变我的 php 代码和 html :(
那么这个问题的解决方案是什么,我不想禁用我的所见即所得编辑器。
all
I need to write some php code in wordpress post and i found the solution on this http://www.hongkiat.com/blog/execute-php-in-wordpress-post-page-and-widget-sidebar/
using phpexec plugin.
But the old question as if i am switching between html editor to visual (wysiwyg) editor,it will change my php code also html :(
So what is solution for this, i do not want to disable my wysiwyg editor.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
否,当您在可视化编辑器和 html 编辑器之间切换时,它不会改变
no when you switch between visual and html editor, it will not change
如果您想在帖子或页面中执行一些 php 代码,您可以使用此插件此插件是免费的
https://wordpress.org/plugins/php-code-for-posts/
you can use this plugin if you want to execute some php code in your post or page this plugin is free
https://wordpress.org/plugins/php-code-for-posts/