Andrew Cashner was acquired a few weeks before the trade deadline to help the Red Sox’s starting rotation, but the right-hander hasn’t found a groove since arriving in Boston.

Cashner gave up six earned runs on seven hits over 5 1/3 innings Tuesday in Boston’s 6-2 loss to the Kansas City Royals. The outing was the latest in a line of tough starts for the 32-year-old, who now has an ERA of 7.53 in five starts for the Red Sox. He posted a 3.83 ERA in 17 starts prior to the trade.

The righty gave up three home runs in Tuesday’s loss, which has become an unfortunate trend for the former Baltimore Orioles starter. Cashner had gone 36 straight innings without allowing a homer before he was sent to Boston, according to MassLive’s Chris Cotillo. He’s given up seven over his 28 2/3 innings in a Red Sox uniform.

Manager Alex Cora said after the loss that location has been his main problem over this tough stretch.

“Today was three missed locations,” Cora said, as seen on NESN’s postgame coverage. “The fastball to (Jorge) Soler was supposed to be down and away and it was up and in and he put a good swing on it. … I think command has been on and off. … When we can’t get the opposition to keep the ball in the ballpark, we’re paying the price and that’s the case with (Cashner).

“As you know, in this game if you give the opposition one extra out or one extra hitter with two outs, lineups are going to make you pay,” Cora added. “He’s not executed his pitches and they’re hitting the ball out of the ballpark.”

Despite his struggles, Cora is still confident in the right-hander.

“There’s a reason we brought (Cashner) here. We believe he’s a good pitcher,” he said. “Today he was cruising through three until that walk. … We trust him. I think stuff wise, he’s still throwing the ball well. If we have to make adjustments mechanically, we’ll take a look at it. But I do feel it’s just location.”

Cashner’s response to his recent performance was rather simple, but it’s clear he’s disappointed in himself.

“I think I’ve just made too many mistakes and they’ve hammered them here,” Cashner said. “This has probably been one of the toughest stretches of my career. I just have to get back to what I do well and get back to that and get them on Sunday.

Similar to Cora, he referenced location as the major issue over his last few weeks.

“It’s been tough” Cashner added. “I think over the course of my career I’ve done a good job limiting damage and I haven’t done a good job of that since I’ve been here. Mistakes are too up in the zone. Haven’t really done a lot of things well but we still have a month and a half left.”

Cashner has given up 26 runs on 38 hits in 28 2/3 innings since being traded to the Red Sox.

Here are some other notes from Tuesday’s Red Sox-Royals game:

— The Red Sox continued to struggle with runners in scoring position, going 2-for-10 in Tuesday’s loss. Cora credited this to stretching the zone for Royals’ starter Jakob Junis.

“Today we swung at a lot of pitches out of the zone or pitches on the edge of the zone that we can’t do damage with.”

— Boston now has lost nine of its last 10 games at Fenway Park.

— Tuesday’s loss snaps the Red Sox’s eight-game winning streak against Kansas City.

— Andrew Benintendi picked up his 60th RBI in the loss. He’s been impressive of late.

The left-fielder has hit .406 with 18 RBI in 15 games since July 22.

Thumbnail photo via Bob DeChiara/USA TODAY Sports Images