After a six-game streak of multi-hit games was snapped on July 4, Didi Gregorius has been in a rough stretch at the plate.

The shortstop didn’t play in Monday, but Gregorius and manager Aaron Boone said he was fine and Gleyber Torres took his spot in the field. Torres went 1-for-3 with a walk.

Still, in his last six games, Gregorius is just 2-for-26 with no extra-base hits, seven strikeouts and no walks.

“He’s been working hard these last couple days, just some mechanical things,’’ Boone said before the Yankees 5-4 loss to the Rays in The Bronx. “I don’t think he’s far off. Sometimes, because he’s so good at making contact, sometimes he puts some balls in play that aren’t the best balls to put in play. But because he’s so good [with his] hand-eye [coordination], maybe some pitches he should lay off or foul balls end up going into play and that gets him hurt.”

His BABIP (batting average on balls put in play), though, is .278, not far off his career mark of .283.

And while Gregorius has had some productive stretches since his June return from offseason Tommy John surgery, he’s had more slumps. The strides he’s made at the plate since joining the Yankees haven’t been as evident lately.

Edwin Encarnacion had two more homers Monday after entering the game in a 7-for-57 slump.

Six of his dozen hits since joining the Yankees have been home runs.

“I don’t worry about Edwin,’’ Boone said. “Great players who win MVP are gonna go through stretches when they’re not getting hits.”

Gary Sanchez’s struggles at the plate continued. The catcher entered 7-for-55 with two extra-base hits, five walks and 20 strikeouts and went 0-for-4 with a pair of strikeouts on Monday.

NBA MVP Giannis Antetokounmpo of the Bucks was at Yankee Stadium and met several Yankees, including CC Sabathia, during batting practice.