I'm looking at adding a snippet of the last post in the threaded layout view (main page), rather like the recent.php file. Is there a simple way to add this ?
Thanks
Hi anonymous3542,
As far as I understand you want to change the Recent Posts page layout with the threaded layout topic list. Am I correct?
Taking this from recent.php, so something similar that can be used on the main page in threaded view under the topic title
$last_post = wpforo_post($topic['last_post']);
Does this help ?
Pretty close I think as there is an array here, but I need to know which branch contains the detail I need
<?php $last_post = wpforo_post($topic['last_post']); echo $last_post; ?>
Exploding the array
<?php $last_post = wpforo_post($topic['last_post']); print_r($last_post); ?>
Would indicate that
$topic['body']
contains that I want, but it doesn't seem to work ? The array itself returns
Array ( [postid] => 2079 [parentid] => 1990 [forumid] => 18 [topicid] => 135 [userid] => 1091 [title] => RE: Centralized authentication service suggestions [body] =>
Thanks! I haven't been able to get back on track with it. I appreciate the suggestions! I will have to find time and get back to it.
[created] => 2019-04-13 15:00:16 [modified] => 2019-04-13 15:00:16 [likes] => 0 [votes] => 0 [is_answer] => 0 [is_first_post] => 0 [status] => 0 [name] => [email] => [private] => 0 [root] => 1990 [url] => https://inocul8r.net/session/community/advice/centralized-authentication-service-suggestions/#post-2079 [is_answered] => 0 [votes_sum] => 0 [likes_count] => 0 [likers_usernames] => Array ( ) )