Soured corn, flavored corn, or rotten just about anything will attract hogs. BUT, if you give'em a choice, they'll go for fresh stuff first. The ageing, or adding diesel helps keep other animals away from your hog bait.
I've had some good luck burying corn, once even dry dog food, mixed with chocolate or strawberry syrup in a hole. The hogs wore it out.