add show posts function

add show posts function