很多朋友可能经常在一些网站上看到类似于“运行代码、、清空代码、另存为代码的静态代码运行框,直接点击运行就能实施的查看效果,给访客带来了非常好的体验。 WordPress也不例外,同样可以加入短代码运行框,效果图如下:
方法非常简单
:
第一步
:下载 run-code-OL.js 文件,上传至服务器。
第二步
:在主题目录的functions.php适当位置添加如下代码: <div class="msgborder" id="phpcode7"> /*
添加可运行代码框/ function textarea($atts,$content = null) { return '<script src="
http://blog.haitianhome.com/wp-content/themes/prowerV3.1/run-code-OL.js" _fcksavedurl=""
http://blog.haitianhome.com/wp-content/themes/prowerV3.1/run-code-OL.js"" type="text/javascript" charset="utf-8">