Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get topic creation date


  • rogerlridge
    Participant

    @rogerlridge

    How do I get the date of when the topic was first created or get the date of the very first post in that topic because all I keep seeing are ways to display the date for the latest post which I don’t want. Any help is greatly appreciated! 😀

Viewing 4 replies - 1 through 4 (of 4 total)

  • rogerlridge
    Participant

    @rogerlridge

    bump…


    Robin W
    Moderator

    @robin-w

    ok, where do you want to see this – on what screens?


    rogerlridge
    Participant

    @rogerlridge

    On the search-topic.php and the search-reply.php pages. On the search results page basically. I have edited the search-reply.php to look like the search-topic.php so that is why I’m asking. Thanks


    vladlu
    Participant

    @vladlu

    bbp_[get]_reply_post_date( bbp_get_topic_id() );

    Really the bbp_reply_post_date() function doesn’t analyze post_type so you can give it anything you want, not only with type “reply”.

    P.S. Topics (and everything) is bbPress is a post (class WP_Post), and every post has post_date (https://codex.wordpress.org/images/2/25/WP4.4.2-ERD.png).

    I think this way is the most elegant and straightforward.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar