ST. LOUIS -AP- Carlos Martinez pitched seven sharp innings, Matt Hollidayhit an emotional home run and the St. Louis Cardinals stayed in the middle of the NL wild-card race, beating the Pittsburgh Pirates 7-0 Friday night.The Cardinals began the day trailing San Francisco by one game for the second NL wild-card spot. The Giants played host to the Los Angeles Dodgers. Martinez (16-9) gave up five singles, walked one and struck out nine. John Jaso led off the second with a single and was the only runner to reach third base against Martinez, who left with a 3.04 ERA.Holliday, out since Aug. 12 because of a thumb injury, was activated off the disabled list at his request Friday.The club informed him earlier this week that it is not planning to pick up the $17 million option on his contract for 2017, and instead will pay him the $1 million buyout.Holliday was given a standing ovation before he pinch-hit in the seventh. He responded with his 20th home run, and came out for a curtain call.Holliday became the sixth Cardinals player to reach 20 homers this season, tying an NL record. It was the first pinch-hit homer of Holliday's career and was the 17th overall by St. Louis this year, extending its major league mark.Jedd Gyorko hit his 29th homer and Brandon Moss hit his 28th for the Cardinals.Tyler Glasnow (0-2) finished his rookie season with his most effective start, working five innings and giving up Gyorko's homer. Glasnow did not allow another Cardinal past second.The Cardinals took a 5-0 lead in the sixth with four runs off relieverTrevor Williams. Yadier Molina and Stephen Piscotty doubled in runs and Moss hit a two-run homer. Moss had been in a 7-for-97 skid.