• Resolved kris921

    (@kris921)


    Hello Foad,I’ve just started using this plugin and i like it very much!But I have encountered a problems a when i try to get title in the new comment it dont display the title in my telegram channel here is my code :

            $title = get_the_title( $comment->comment_ID );
            $d = "Y-m-d g:i:s";
            $comment_date = get_comment_date( $d, $comment_ID );
    		$author_text = get_comment_author( $comment_ID );
    		$comment_text = get_comment_text( $comment_ID );
    
    		//notification body
    		$message .=  __( '<em>New Comment</em> ', 'telefication' ) . "\n";  
    	    $message .= _('<strong>'.$author_text .'</strong>'). " <em>wrote at</em> \n";
    	    $message .= '<i>' .$comment_date .':</i>';
    	    $message .= $title;
    		
    
    		$message .= $comment_text . "\n\n";
    
    		$message .= __( 'Comment Link: ', 'telefication' ) . get_comment_link( $comment_ID );
    
    		$telefication_service = new Telefication_Service( $this->options );
    
    		if ( $telefication_service->create_url( $message ) ) {
    			$telefication_service->send_notification();
    		}
     Thank you. 
    • This topic was modified 5 years, 11 months ago by kris921.
    • This topic was modified 5 years, 11 months ago by kris921.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cannot Get post Title in new comment’ is closed to new replies.