Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Count replies ant get last activity link

@rederis

Participant
function new_forums_notice_to_menu($items, $args) {
	 if(count_new_forum_posts() > 0){
          if( $args->theme_location == 'primary' )
          $items .= '<li><a href="http://***/forums/" text-transform="lowercase" text-shadow="2px 1px 2px black"><font color="red">Šios savaitės naujos žinutės forume: <span>'.count_new_forum_posts().' ('.count_new_forum_post_time().')</span></font></a></li>';
     return $items;

I try to hook up to my menu (later on exact menu element “Forums” ) to print “There is (count_new_forum_posts()) new posts this week”

My head menu should be Home Personel Phones Forum (2) News. But now there is problem only with replies count. I think there is problem with my query ‘key’ => ‘_bbp_last_active_time’ cant be assosiated with ‘replies’ data only with ‘Topics’. I am very green on programming so strugling. I already fixed kinda problem by adding (last reply date – current date time diference).

Skip to toolbar