WordPress の $post の中身・内容を調べてみよう
WordPress の $post はループ内で使用できる変数だそうで。
中に何が入っているのか気になるので、分解してみました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
stdClass Object ( [ID] => 4025 [post_author] => 2 [post_date] => 2010年04月24日 18:07:14 [post_date_gmt] => 2010年04月24日 09:07:14 [post_content] => WordPress ではページ毎にテンプレートを用意することが可能... [post_title] => WordPress のページテンプレートの情報を取得する方法 [post_category] => 0 [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => wordpress-pagetemplate-meta [to_ping] => [pinged] => http://animal-taste.com/wordpress-tips/2008/12/1044.html [post_modified] => 2010年04月24日 18:09:54 [post_modified_gmt] => 2010年04月24日 09:09:54 [post_content_filtered] => [post_parent] => 0 [guid] => http://weble.org/?p=4025 [menu_order] => 0 [post_type] => post [post_mime_type] => [comment_count] => 0 [filter] => raw )
便利ですね。今後に使えそうです。
関連記事
- WordPress のページテンプレートの情報を取得する方法
- Twitter に最新記事を表示する WordPress のプラグイン Post to Twitter
- WordPress で特定のカテゴリの記事をリストで一覧にするコード
- form から 二次元配列を post する方法
- WordPress の the_excerpt() で記事の抜粋と続きを読むリンクを出力させる方法
- WordPress でページのパンくずリストを表示するソースコード
- WordPress をホームページビルダーみたいにする TinyMCE Advanced
- WordPressをインストールしたらパーマリンクを設定する。
- AddQuicktag をインストールすれば WordPress で面倒なタグ打ちの手間を省ける
- WordPress 2.8 のダッシュボードが崩れる場合の解決策
コメント
コメントは受け付けていません。