Wordpress/頁:修訂版本之間的差異

出自福留子孫
跳轉到: 導覽搜尋
第 22 行: 第 22 行:
 
#post_parent 為插入此圖照之頁 id
 
#post_parent 為插入此圖照之頁 id
 
#post_type 為 attachment,post_mime_type 欄指示圖照格式,如:image/png
 
#post_type 為 attachment,post_mime_type 欄指示圖照格式,如:image/png
 +
===讓頁可以執行php===
 +
#安裝 Exec-PHP 外掛
 +
#*到WordPress後台,點擊【外掛】→【新增外掛】,進入後在搜尋欄位輸入「Exec-PHP」並點擊﹝搜尋﹞。
 +
#*找到名為「Exec-PHP」的外掛,點擊右方的「安裝」,再點擊﹝立刻安裝﹞。
 +
#*系統就會開始自動安裝外掛,安裝完成後請點擊「啟用外掛」。
 +
#下載 Exec-PHP 中文語系檔
 +
#*到[http://cloud1.myweb.hinet.net/download/wp/exec-php_zh_TW_4_9.zip http://cloud1.myweb.hinet.net/download/wp/exec-php_zh_TW_4_9.zip]下載中文語系檔。
 +
#*解壓縮得 exec-php-zh_TW.mo 和 exec-php-zh_TW.po
 +
#*上傳到「/wp-content/plugins/exec-php/languages」目錄中
 +
#

2016年8月26日 (五) 21:03的修訂版本

是 wp_posts 中的一筆資料,其 comment_status 欄為 closed

  1. 頁抬頭在 post_title 欄,會秀在整頁的最上方。本欄同時是串接新舊版本的 key
  2. 內容在 post_content 欄
  3. 到達方法:
  4. 最新版本其 post_type 為 page ,post_status 為 publish
  5. 舊版其 post_type 為 revision(調整),post_status 為 inherit(繼承)
  6. 最後更新版本的 id 始終不變,產生新的 id 去永舊版。
  7. 直接改 post_content 欄值一樣生效,這樣就不會產生新的舊版資料。
  8. 直接改 post_title 、 post_name 也生效。

附件

實體是圖照,在 wp_posts 中有一筆說明資料,其 comment_status 欄為 open

  1. 實體在 wordpress/wp-content/uploads/年/月/ 中,由 guid 欄指示路徑
  2. post_title 欄和 post_name 都是圖照的檔名(不含副檔名)
  3. 頁中以 a 標籤內包 img 標籤表達。
  4. post_status 欄值為 inherit
  5. post_content 欄空白
  6. post_parent 為插入此圖照之頁 id
  7. post_type 為 attachment,post_mime_type 欄指示圖照格式,如:image/png

讓頁可以執行php

  1. 安裝 Exec-PHP 外掛
    • 到WordPress後台,點擊【外掛】→【新增外掛】,進入後在搜尋欄位輸入「Exec-PHP」並點擊﹝搜尋﹞。
    • 找到名為「Exec-PHP」的外掛,點擊右方的「安裝」,再點擊﹝立刻安裝﹞。
    • 系統就會開始自動安裝外掛,安裝完成後請點擊「啟用外掛」。
  2. 下載 Exec-PHP 中文語系檔