Saving the permalink setting of WordPress should fix this issue.