adding function for Recent post sidebar