MIAMI — Cesar Hernandez was taking batting practice here Tuesday when he hit a bloop into center field. Standing behind the cage, his former Phillies teammate shook his head disapprovingly.

Jimmy Rollins wasn't impressed.

"He was like, 'No, no, no. You can not hit it there. You're a small guy. You're a little guy. You have to hit the corners [of the field],'" Hernandez said through a team translator. "My reply was, 'Yeah, but I already hit a home run here [in Miami, early in the season].' And he said, 'Yeah, well, you can check that off your list. You're a little guy like me. You have to put the ball in play and run.'"

These past few months have been rough for Hernandez. The Phillies' leadoff-hitting successor to Rollins is mired in a wicked slump — .208 with a .307 on-base percentage since the all-star break — and manager Gabe Kapler has moved him all around the batting order in an attempt to get him going again. Hernandez has gone from leadoff to the No. 3 spot and was even dropped to ninth. On Tuesday night, he batted seventh against the Marlins rookie starter Trevor Richards.

Turns out, all he needed was a pep talk from Rollins.

Hernandez cleared the bases with a three-run triple, part of the Phillies' four-run first inning en route to a 9-4 giggler before an announced crowd of 7,131 at Marlins Park. The victory, coupled with the Atlanta Braves' loss at home to the Boston Red Sox, moved the Phillies to within three games of first place in the National League East with 24 games remaining, including seven against the Braves.

"It was huge for me and for the team just to score so many runs in the first inning," Hernandez said. "It helped a lot. Any time you hit a triple to clear the bases, it's huge. To open up the game like that, it was really, really good for us."

After the Phillies scored three runs in their previous three games, Kapler continued to shuffle the deck, assembling his 114th different batting order. In addition to finding another spot for Hernandez, he moved Carlos Santana into the leadoff spot.

When the offense is going well, the Phillies see a lot of pitches, grind down opposing starters and draw walks. But they had averaged only 2.5 walks in 26 games entering Tuesday night, down from 3.8 walks per game through the season's first 111 games. Santana has been the Phillies' most consistent hitter in terms of seeing pitches, which led Kapler to put him atop the batting order.

Santana began the game with a home run, his seventh career leadoff homer. Talk about setting a tone. The Phillies scored as many runs in the first inning (four) as they had in the previous 31 innings combined.

"We're capable of having these breakout games, not just one out of 10," said starter Jake Arrieta, the beneficiary of the run support who gave up four runs and struck out 11 batters in 7 1/3 innings. "We've got a nice cavalry of bats to use, guys off the bench. We can really swing it. It just hasn't been clicking for us as of late."

Said Kapler: "I thought we got back to our Phillies style of offense. Saw a lot of pitches, worked a lot of walks, but then we had some extra-base hits at the end of those deeper counts. Carlos Santana set the tone with that big home run. He showed us how to do it, and we kind of followed his lead."

But Hernandez delivered the big blow. Kapler called it "a hit we've been missing," and it was precisely the sort of hit that Rollins was talking about — a line drive down the first-base line that rattled around the right-field corner and enabled Odubel Herrera, Wilson Ramos and Nick Williams to score.

It was Hernandez's first extra-base hit since Aug. 22, a span of 44 plate appearances, and only his fifth extra-base hit since the end of July. That it came with two outs was also notable. Two-out hits — really, hits of any kind — haven't been plentiful for the Phillies lately.

Rollins' words were part of a tension-breaking pregame for Hernandez. He got a visit from a Charly Mata, a friend and a popular comedian in his native Venezuela. Santana also passed along some advice, telling Hernandez to "calm down and try to remember what I was doing earlier in the season."

But the visit from Rollins, the iconic former Phillies shortstop who was invited by Kapler to spend a few days with the team in Miami, made the biggest impact.

"It was great to see Jimmy today because, first of all, it makes me proud to say I played with him, such a good player," Hernandez said. "Just to have him in the clubhouse, in BP, it was really good just to help me relax."

And now, with a victory Wednesday night, the Phillies could win their first series in exactly one month, since their four-game sweep of the lowly Marlins at Citizens Bank Park on Aug. 2-5. After an overdue offensive outburst, might Kapler actually keep the lineup the same?

"In some ways, you'd say consistency would be running the same lineup back out there," Kapler said. "But really, I think the consistent move is to examine the lineup and see what makes sense for tomorrow."

At this point, whatever works. If only Hernandez could talk Rollins into sticking around for a while.