0
A
回答
1
不知道這是你在尋找什麼,但這裏有一個插件,它允許你安排一個頁面的一部分或交使用簡碼:http://wordpress.org/extend/plugins/scheduled-content/
它的工作原理是這樣的:
<p>This paragraph is visible by default.</p>
[schedule on='2012-03-20' at="07:00"]
<p>This paragraph will be published on March 20th at 7 am.</p>
[/schedule]
0
它會始終是相同的職位,將得到更新?在這種情況下,只需要創建一個功能,它掛接到wp_cron.php,點擊這裏http://codex.wordpress.org/Function_Reference/wp_schedule_event 文檔中的一個例子是這樣的(把你的functions.php)
// first parameter is when it should occur, you can set this for example
// by using php's time(), which will fetch the current time, then add how much
// further in time you want the event to occur (in seconds).
wp_schedule_single_event(time()+600, 'function_that_get_called');
//the above code will run 10 minutes after functions get called.
function function_that_get_called() {
$my_post = array();
$my_post['ID'] = the_post_id; // the ID of the post you wish to update.
$my_post['post_content'] = 'New content for my post!';
wp_update_post($my_post);
}
問題與使用WordPress自己的cron功能大多數人訪問過你的網站讓它觸發,但是我猜你可以將上面的代碼添加到你的functions.php文件中,保存並在之後自己訪問網站,它會觸發。 確保添加類似的功能:
error_log('my_scheaduled_event triggered!');
所以,你可以檢查你的PHP錯誤日誌和看到函數實際上正確觸發。
相關問題
- 1. 排除Wordpress中的帖子
- 2. PHP的WordPress的 - 最新的3帖子
- 3. WordPress的新帖子
- 4. 安排在rails 3博客中發佈帖子
- 5. 頻繁更新WordPress的帖子
- 6. WordPress的:顯示「更多的帖子」按鈕只有在帖子> 3
- 7. 有沒有辦法在Wordpress中發佈帖子時自動更新帖子?
- 8. 從菜單wordpress中排除帖子
- 9. 如何在Wordpress帖子頁面安排the_content()?
- 10. 排名POST基於wordpress中的meta_value [示例:「12篇帖子中排名3」]
- 11. 如何安排帖子
- 12. 在Wordpress中創建/更新新帖子後更新/插入自定義表格
- 13. 最新帖子if else - wordpress
- 14. WordPress最新帖子輪播
- 15. 在wordpress中發佈更新帖子作者
- 16. 在WordPress中查詢刪除比X天更新的帖子
- 17. 僅排除最新帖子Feed中的第一篇文章,wordpress
- 18. Wordpress查詢,排除類別中的最新帖子
- 19. 在wordpress中隱藏帖子
- 20. 在wordpress中查詢帖子
- 21. 獲取所有wordpress帖子並連續顯示3個帖子
- 22. WordPress在創建新帖子時保存翻譯帖子
- 23. 在發佈帖子時更改wordpress帖子作者
- 24. 跳過wp_get_archives()中的最新wordpress帖子
- 25. 功能wordpress中的最新帖子
- 26. Wordpress - 在新帖子上執行命令
- 27. 博客頁面=最新帖子在WordPress
- 28. 如何在wordpress上列出新帖子?
- 29. 無法更改WordPress中的每個帖子的帖子帖子類型查詢
- 30. 按meta value排序的帖子 - wordpress
是的,這是一個開始,我今晚試試。 – EOB 2012-03-02 14:34:59