HERSHEY, PA. — The Hershey Co. said it plans to raise prices on certain chocolate and candy items in the coming months. The pricing actions affect the company’s instant consumables business, which represents roughly one-third of overall sales, said Michele G. Buck, president and chief executive officer.

Recently, the company raised prices on bagged candies, gums and mints, which, along with new and limited-edition Reese’s product launches, contributed to higher sales in the latest quarter.

Net income attributable to the Hershey Co. in the second quarter ended June 30 was $312,840,000, or $1.54 per share on the common stock, up 37% from $226,855,000, or $1.11, in the prior-year period.

Net sales increased 0.9% to $1,767,217,000 from $1,751,615,000 the year before.

North America segment income rose 6.1% to $470,898,000 on sales of $1,568,040,000, up 0.5% from the year-ago quarter. International and Other segment income rose 32% to $21,944,000 on sales of $199,177,000, up 3.9%.

“We had another strong quarter of gross margin expansion, which enabled brand and capability investments as well as robust earnings growth,” Ms. Buck said during a July 25 earnings call. “While some of our second-quarter margin and earnings gains were timing related, the underlying trend remained solid. This strong gross margin expansion of almost 200 basis points drove second-quarter adjusted e.p.s. growth of 14.9%.”

Over the past year, Hershey has increased advertising investment behind some of its smaller brands, including Almond Joy, Mounds, York, Payday, Twizzlers, Heath and Rolo.

“Early results are encouraging, with our Heath brand growing 37% and our Rolo brand growing over 7% over the last four weeks,” Ms. Buck said. “While not all of this growth is incremental, having more brands in our portfolio stay relevant with our consumers and growing is critical to our overall category leadership.”

The company’s recently acquired Pirate’s Booty business was challenged by distribution losses at several key retailers and lapping year-ago promotional activity, Ms. Buck said.

“The distributional losses occurred during the sales transition, but we remain confident that trends will improve in the second half as planograms reset and year-over-year promotional activity normalizes,” Ms. Buck said. “Retail sales trends for the latest four weeks are already improving versus the last 12 weeks, and we expect that will continue to improve.”

Consolidated net income for the six months ended June 30 was $617,198,000, equal to $3.03 per share on the common stock, up from $577,058,000, or $2.82 per share, in the same period of the prior year. Net sales totaled $3,783,705,000, up from $3,723,574,000.

“We have good momentum across all of our key strategies, with strong financial results in the second quarter,” Ms. Buck said. “We will continue to invest in our brands and our capabilities to take this business to the next level and drive sustainable top- and bottom-line growth.”

Full-year net sales are expected to increase by 2%, the mid-point of the previously stated 1%-to-3% range, and full-year earnings per share are expected to be relatively flat with the prior year.