rederis (@rederis)

Forum Replies Created

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

  • rederis
    Participant

    @rederis

    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).


    rederis
    Participant

    @rederis

    If I have this week 2 old topics with 2 and 3 replies within this week. I need to print out
    “There is 5 replies this week (last one 5 mins ago)”.
    Currently it prints
    “There is 2 topics this week ()”.

    When I change post_type from Topic to Reply
    “There is 0 replies this week ()”

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