Skip to:
Content
Pages
Categories
Search
Top
Bottom

Get topic creation date

  • @rogerlridge

    Participant

    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 5 replies - 1 through 5 (of 5 total)
  • @rogerlridge

    Participant

    bump…

    @robin-w

    Moderator

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

    @rogerlridge

    Participant

    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

    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.

    @hydrogriff

    Participant

    Can you elaborate on this? Do you mean bbp_reply_post_date() can also be used for topics?

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