*

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 を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

関連記事

no image

PHPのpear インストールにて

今さらながらPEARを触ることに。以前に少しだけ触ったことがあって、「ダウンロードするだけでしょ?超

記事を読む

no image

eclipseのリソース名を変更する

ちょっとキョドったのでエントリー。 1. eclipse > エクスプローラー から名前を変更

記事を読む

no image

やっぱiphoneはすごかった

  いろいろ迷って2台持ちを決意。iphone1台にすると、データ通信量がハンパない

記事を読む

no image

WEBディレクター、WEBエンジニア募集してます。

いっしょにWEB制作やりましょう! クライアント駐在(派遣) 場所:都営大江戸線

記事を読む

no image

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

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

記事を読む

no image

wordpress plug-in [register_taxonomy_for_object_type]

register_taxonomy_for_object_type仕事で使っているWordpress

記事を読む

no image

ブログ更新情報をTwitterに流す、FeedBurnerの「Socialize機能」

タイトルの通り、ブログの更新情報をTwitterに流す方法。 結論から言うとFeedBurnaer

記事を読む

no image

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

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

記事を読む

no image

webアプリの行方

Google Appsの説明会に行ったとき、「Googleのサービスはweb100%を目指し

記事を読む

composerでcakephpをインストールしてプロジェクトを始めてみる

こんにちは!今日も寒いです。 この時期になると気になってくるのが花粉症です。 自分は花粉

記事を読む

Google AD

Google AD

PAGE TOP ↑