If your holding period approximates forever, you probably see stock declines as opportunities. That's particularly true for companies that have strong businesses and solid operating histories. Add in historically attractive dividend yields, and you could be describing General Mills (GIS -0.77%) and Hormel Foods (HRL 0.14%). Here's why long-term investors with $1,000 might want to buy one or both of these iconic consumer staples stocks.

General Mills is always adjusting to the times

If you look at General Mills as a food maker, you probably aren't thinking about the company broadly enough. That's because its real strength is in brand management. Yes, those brands are all food-related, but it is always buying and selling brands to ensure that its current portfolio of products best aligns with current consumer demand.

Lately that has included things like buying Blue Buffalo (including a subsequent bolt-on pet snack deal), the dominant healthy pet food maker, and selling the Hamburger Helper business.

Management basically tries to ensure that the company owns a portfolio of high-demand food items. That, in turn, has allowed General Mills to increase its dividend regularly -- though not annually -- for decades. The stock has generally trended higher along with the dividend. With a recent dividend increase of 9%, there's no particular reason to believe the dividend trend is going to reverse course.

And yet investors worried about the current state of the food sector have dumped the stock and pushed the yield up to around 3.7%. That's at the high side of the historical range, suggesting the stock is on the sale rack.

GIS Chart

GIS data by YCharts

In fairness, there are notable headwinds for the company to deal with today. For example, since inflation led to material price increases for consumers, the food sector appears to be entering a period in which market share will be a key focus. That will likely make it harder to protect margins. But General Mills has been in business for over a century -- it's done this before and survived.

This industry-leading consumer staples company is worth a close look right now if you think in decades and not months.

Hormel: Dealing with more than one headwind

The big-picture story is very similar for Hormel, but worse. For starters, Hormel hasn't had as much success at passing on its rising costs to consumers. Thus, inflation had a bigger negative impact on the food maker's margins than it did on many of the company's peers.

Then there was avian flu, which caused issues for its Jennie-O Turkey business. Also, a tough market has resulted in a slower-than-expected turnaround at recently acquired Planters. And the Chinese market isn't rebounding as rapidly as hoped from coronavirus-related lockdowns. There are a lot of negatives here.

That has investors particularly worried, given that the 2.9% dividend yield is now near the highest levels in the company's history. But Hormel is a Dividend King, with over 50 years worth of annual dividend increases behind it. It has muddled through hard times before. Notably, the most recent dividend increase was 6%, which is pretty solid given the multitude of headwinds. And yet, most of the problems the food maker faces today are likely to be transitory. 

HRL Chart

HRL data by YCharts

So while Hormel isn't executing at the top of its game right now, investors with strong stomachs might want to take a closer look. Note, too, that the Jennie-O operation's issue was supplying strong demand during a period where it had a limited supply of turkey. And Planters, while not doing as well as hoped, is outperforming in the struggling nut category. Indeed, there are green shoots here that suggest Hormel hasn't lost its touch. 

Down and out, but reliable and boring

Neither Hormel nor General Mills is going to be hugely exciting as an investment. But that's par for the course in the consumer staples space. They might even languish for a little bit before things start to get notably better. What's most interesting is that these food makers are so out of favor despite long and successful histories, including on the dividend front.

If you can hold your nose long enough to get to know these stocks, you might find buying one, or both, a highly attractive proposition.