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
)

便利ですね。今後に使えそうです。

コメント

コメントは受け付けていません。