Info
- 3 posts
- 2 voices
- Started 3 years ago by jabberwock
- Latest reply from jabberwock
- This topic is resolved
First poster / thread started by...
-
- Posted 3 years ago #
In forum.php and front-page.php, the latest poster for each topic is identified. Is it possible to also identify the first poster-- ie the person who started the thread and perhaps also when the thread was started? After sifting through code for several hours, I'm not sure if I'm overlooking something, or if I simply cannot find something that is not there. Thanks.
-
- Posted 3 years ago #
On this forum "Started 5 hours ago by jabberwock" appears. So, there are functions to do what you want to do. Maybe it's just not in the theme you're using. This is in my topic.php:
<li><?php printf(__('Started %1$s ago by %2$s'), get_topic_start_time(), get_topic_author()) ?></li>Those are your functions. The get_topic_start_time returns a time elapsed sort of thing (i.e. "5 days ago") rather than a date. There is probably a function to return the topic start date instead of time elapsed as well. Maybe it's topic_time or get_topic_time or topic_start_time. All the functions are pretty reasonably named.
-
- Posted 3 years ago #
Thanks for the response. You were exactly right: the theme that I'm modifying simply didn't make use of those functions. Can't find something that's not there.
get_topic_author was exactly what I was looking for and it's right there in the default theme. I should have known to look there.
Thanks again for taking the time to respond. It is greatly appreciated.Cheers!
-
You must log in to post.