// you’re reading...

WordPress

讓 Widgets 也能執行 PHP Code

這篇的內容主要是從「Fun with Widgets」這篇節錄出來,裡面到底談了些什麼,想了解的人就去點那個連結看看吧!在這我只用簡單的方式提一下,要怎麼做才能用 WordPress 內建的 Widgets 也能執行 PHP Code。

為了配合作者的寫的 ExecPHP 這隻 Plugin,他建議把原來的 Widgets.php 給替換掉。作法很簡單,把 widget.php 下載儲存到 $WPDIR/wp-include/ 這,蓋過原來的 widgets.php 就行了。

接著下載 execphp.zip 到 $WPDIR/wp-content/plugins 且安裝它。這樣你就能在 Presentation -> Widgets 裡找到能使用 PHP 的 module,也能快樂的使用 PHP Code 啦!

Discussion

One comment for “讓 Widgets 也能執行 PHP Code”

  1. [...] 若您還需要相容php 的widgets,請見螺絲起子:讓 Widgets 也能執行 PHP Code [...]

    Posted by 如何將「部落格觀察」、QR Code ,透過widgets加入wordpress | 貓尾巴 - la queue du chat | August 23, 2007, 5:01 am

Post a comment