Implement wordpress loop for index and category