For investors, the golden years should look notably different than the years spent earning income and building a nest egg. As long as paychecks are being collected, growth in a portfolio's total value is a priority. But after the paychecks stop, a portfolio often becomes a key source of income. The shift requires a whole new set of stocks.

To that end, here's a rundown of three dividend stocks (and their current yields) that retirees or those nearing retirement may want to consider. They might not have been on your radar before, when capital appreciation was the goal, but that's kind of the point.

Most retirement plans should include at least some dividend stocks

Image source: Getty Images.

Duke Energy pays you like people pay electric bills: reliably (4.7% yield)

Most lists of dividend stocks well suited for retirees will include a utility. This one will be no different. Duke Energy (NYSE:DUK) is a reliable, income-generating workhorse that could serve as a cornerstone of any income-oriented portfolio.

Most investors likely know a bit about the organization. Duke Energy provides power to about 7.7 million customers spanning six different states, most of whom are in the midwest and southern parts of the United States. It's one of the biggest and oldest names in the business, and isn't likely to be elbowed out of its markets anytime soon.

What investors may not be able to fully appreciate about Duke is how well-managed its operation is.

The utility industry has gone through significant changes in recent years, like the introduction of solar power and the beginning of the end of coal. These shifts can be tricky, and expensive, but Duke Energy has found a way to make it work to its advantage. Profit margins have held steady since 2010, overcoming 2018's headwind to return to their long-term average this year despite plenty of pricing turbulence in the meantime. That's let Duke work its dividend payout ratio downward to its current value of 72%, giving it more fiscal flexibility to make dividend payments in the future. It's $56 billion capital spending plan for the next five years is also big on renewables, and heavily prioritizes customer affordability... things that translate into longevity, including the longevity of its dividend that's grown every year for the past 15 years.  Chalk it up to the fact that consumers may postpone the purchase of a new car or cancel a vacation, but usually don't risk having their power disconnected by failing to pay their monthly bill.

Physicians Realty Trust sidesteps COVID-19 headaches other landlords face (5.3% yield)

There's rarely a truly awful time to own rental real estate, either directly or through a real estate investment trust (REIT). But the fallout from the pandemic may be setting the stage for one of those rare scenarios where real estate ownership is a liability. J.C. Penney filed for bankruptcy protection in May, hinting at the sort of trouble the retail industry is in. And the fact that Hertz has also filed for bankruptcy protection suggests that landlords outside of the shopping realm may be treading on thin ice as well.

But there may be one sliver of the business real estate market that's well shielded from the coronavirus contagion's impact: doctors' offices. People may be steering clear of clinical visits that aren't absolutely necessary right now, but there will come a time when consumers reprioritize care even if they've not yet reprioritized other economic activity.

Enter Physicians Realty Trust (NYSE:DOC), which owns 260 different healthcare properties (mostly medical office buildings) in 31 different states. These businesses are difficult to move, but by and large they don't need to, since they're not in the same dire financial straits other businesses are. The REIT reported at the beginning of this month that as of June, 98% of April's billing had been successfully collected, while 97% of May's rents due were in hand. It's a strong sign that doctors' offices and clinics are holding up well in an otherwise rough environment.

Walmart is meeting consumers where they are, literally (1.8% yield)

Finally, add Walmart (NYSE:WMT) to your list of solid dividend stocks to own in retirement.

It's not one of the usual go-to dividend names; the current yield of 1.8% isn't much to write home about, either. Where the world's biggest brick-and-mortar retailer really shines, however, is in the steady growth of its payout. Walmart has now upped its dividend for a 47th consecutive year, and there's no reason to think that this progress will be stifled anytime soon.

Better still, despite the presence of a monolithic competitor like Amazon.com in the same consumer-focused space, Walmart may be making inroads as a lifestyle company. For example, where it's licensed and willing to do so, Walmart now sells premium liquors. Curbside pickup of online orders has been such a hit that in May, Walmart combined its general-store and grocery apps, and will now bring bigger items like bicycles and televisions to your car. Earlier this month, the company opted to turn 160 of its parking lots into impromptu drive-in theaters that will bring concessions to viewers' cars. And that's just a small sampling of what the company has done of late to better connect with consumers.

None of these initiatives directly adds incremental revenue to the top line or additional profits to the bottom line. All of them help deepen the relationship Walmart has with its customer base, though, which is the unique opportunity that the retailer had ignored for too long. The stage is set for more (and more frequent) repeat customer spending in a way Amazon simply can't mimic.