With the help of following snippet below, you will be able to have a loop in category in WordPress.