*

wordpress plugin change the taxonomy when you suggest the time

公開日: : 最終更新日:2013/04/01 WEBサービス, システム , , ,

1. at first, download Post Expirator.

2.change code like this,

line72
——————————————————————————

// wp_update_post(array(‘ID’ => $a->post_id, ‘post_status’ => ‘draft’));
// delete_post_meta($a->post_id, ‘expiration-date’);
// update_post_meta($a->post_id, ‘expiration-date’, $a->meta_value, true);

delete_post_meta($a->post_id, ‘expiration-date’);
wp_set_object_terms($a->post_id, ‘after_event’, ‘public_status’);

——————————————————————————

i think impotant is ‘wp_set_object_terms’ function.

more information
http://codex.wordpress.org/Function_Reference/wp_set_object_terms

Google AD


Message

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

関連記事

cakephp2にACLプラグインを入れてみた

cakephpで、ユーザーによって権限やアクセスを変えたりする方法を調べてたら、それ用のプラ

記事を読む

no image

Blogger Syntax Highlighter

今さらですが、Blogger移転を機にSyntax Highlighterを入れてみました。こちらの

記事を読む

no image

EC-cube+MYSQL < EC-cube+PostgreSQL

http://sasapurin.doorblog.jp/archives/cat_50047102

記事を読む

no image

moodleをインストールしてみた

Eラーニングの話題が上がったので、調査のためMoodleをインストールしてみました。 1.

記事を読む

postgresqlのスロークエリ(スローログ)を取得する

45年ぶりの雪が、1週おきに降るってどういうことでしょうか? とは言え、雪が降るといつもと

記事を読む

DiCE

64ビットwindows8にDiCEを入れる

DiCE[/caption] 新しいPCにwindows8入れてから、旧PCを全く触らなくな

記事を読む

no image

img画像に隙間(空間)ができる件

何度か経験してそのたびにイラッときたので自分用にエントリー。 スタイルシートで下記のように記述

記事を読む

no image

ロリポップ+お名前.comで独自ドメイン取得

onamae.com で独自ドメイン取得しました。 そのときのメモ。 1.lollipo

記事を読む

no image

Gitに挑んだりしてみる

複数で開発するにあたって絶対必要と言ってもいい、バージョン管理ソフト。WEBSVNという選択肢も頭を

記事を読む

no image

ec-cubeで欲しい機能

仕事で、ec-cubeを触っている。どこの企業でも同じだと思うが、ec-cubeを使っているとカスタ

記事を読む

Google AD

Google AD

PAGE TOP ↑