WordPressに関する情報や技術紹介です

Per ottenere il post ID

Invia articolo per ottenere l'ID che è correntemente visualizzato.

Può essere ottenuto in "$ post-> ID" Al fine di ottenere l'ID del post.
Sembra che non viene consegnato per qualche motivo (articolo schermata di modifica) schermata di gestione.
Io uso il seguente comando.

//投稿IDの取得
global $post_ID;

これで「$post_ID」に投稿IDが入ります。

タグ
トラックバックURL

Leave a Reply

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

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

ページTOPに戻る