我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

包括Wordpress功能

Is there a way to run an external php file in wordpress that will be able to use all the WP's tags?

Yes. You should just include the wp-blog-header.php file at the top of the PHP file.

include(dirname(__FILE__) . '/../../../wp-blog-header.php');

Load wp-load.php to include all the Wordpress functions.

However, beware of bugs.

近期文章

  • php单例对象未创建
  • PHP和SWF - 幻灯片放映不显示
  • JQuery Ajax失败/取消
  • livequery不工作ie
  • POST变量未正确传递给操作
  • 多个输入的一个验证功能
  • 如何获得Citrix Gotomeeting Access Token
  • 将ajax数据传递给codeigniter控制器
  • 为什么代码无法更新csv中的内容?
  • KOHANA 3.2.0不选择列
  • komodo IDE - >远程调试php使用komodo + xdebug:如何观看$ _SERVER变量?
  • socket_select(),带有2维数组
  • Mysql命令到PHP
  • 从递归函数返回一个值
  • PHP中的指针问题[重复]
  • openid:没有重定向的登录
  • PDO获取表不起作用
  • PHP:使用Curl验证URL
  • 对于使用Ajax的PHP搜索
  • PHP文件的自定义MIME类型

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华