Tag Archives: wordpress

wordpress 開發插件必看文章

要開發wordpress 插件,當然少不了就是要熟悉一下wordpress的環境,然後再看開發說明啦。不過說明書實在太多了,如何入手都成問題,多數還是會參考別人的插件,再設計自己的插件。要上手,還是有些文章值得參考。 1. 教學:如何開發wordpress 插件 http://www.devlounge.net/extras/how-to-write-a-wordpress-plugin 十分詳細 2.官方開發說明書 http://codex.wordpress.org/Developer_Documentation 3.官方提供插件開發資源 http://codex.wordpress.org/Plugin_Resources wordpress 有個十分重要的概念就是hook,因此要了解清楚。 插件開發有幾個十分重要,就喺action, filter,post,loop等,下面推薦收藏 http://codex.wordpress.org/Plugin_API http://codex.wordpress.org/The_Loop filter 介紹:http://codex.wordpress.org/Plugin_API/Filter_Reference 插入文章tag: http://codex.wordpress.org/Function_Reference/add_shortcode http://codex.wordpress.org/Function_Reference/add_filter

Posted in wordpress | Tagged , , | Leave a comment

wordpress wp ecommerce last product

wordpress 設計theme 時需要在首頁取得wp ecommerce 的最新產品資料,可以用以下方法,輸出圖片,和title,網上找沒什麼資料,只好自己在widget 改一下那來用 global $wpdb; $args = wp_parse_args( (array)$args, array( 'number' => 5 ) ); $number = 3; $image = true; $width = 150; $height = 150; $latest_products = get_posts( array( 'post_type' => 'wpsc-product', 'numberposts' => $number, … Continue reading

Posted in php, wordpress | Tagged , , | Leave a comment

wordpress 判斷首頁

wordpress theme 製作記錄 今日製作到sidebar 時,突然常用的is_front_page() 不能使用,於是改用了is_home() 代之,又正常了,沒有時間去查證,初步估計可能是因為設定了首頁為某指定頁面有關。

Posted in wordpress | Tagged , , , | Leave a comment

wordpress 自定rss 內容

wordprss 可以選擇訂閱內容全部顯示或部分顯示,假如部分顯示,也許有些東西在底部推薦給讀者的看不到,這裡有個方法,在function 裡面加上一段 if ( !function_exists('custom_feed_footer') ){        function custom_feed_footer($content)         {                if(is_feed())                $content .= '自定內容';              … Continue reading

Posted in Code, wordpress | Tagged , , , | 1 Comment

wordpress 2.9 carmen

wordpress 正式升級為2.9,新增了不少新功能: 1. 垃圾桶,文章刪除后不是直接刪除,而是暫時存放在垃圾桶,避免誤刪 2.內置相片編輯器,以後不用在本地編輯了 3. 插件批量更新 4.影片發布,這個我等了很久,現在影片發布只會顯示一條鏈接,郁悶 登入你的wordpress升級吧 來源http://wordpress.org/development/2009/12/wordpress-2-9/

Posted in wordpress | Tagged , | Leave a comment

wordpress 2.8

wordpress 2.8 推出了,雖然我還沒時間升級,不過網上看到文章說速度變化不大,只是對開發人員比較有利.我也是在等待這個版本,差不多要改下主題了。 wordpress 2.8 比較有用的 網址 wordpress 2.8 codex wordpress 2.8 介紹 Widget API 建立 WordPress 2.8 and the body_class() Function wordpress 2.8 footer loading javascript 有時間再慢慢研究

Posted in wordpress | Tagged , | 1 Comment