Kenyon Martin said he will not play for the Knicks until after the All-Star break to rest his chronic ankle and foot injury.

Martin was in a walking boot as he entered the locker room before Wednesday’s 94-90 loss to the Trail Blazers — the 10th of the last 12 games he has missed.

He returned from a nearly two-week absence to face the Celtics last week, missed the next game against the Cavaliers and tried suiting up against the Heat before aggravating the injury.

Now he’s done for a while.

“I was playing in pain,’’ Martin said. “You’re supposed to play through some stuff. But playing in pain ain’t cool all the time — not knowing about the next day. It’s more frustrating than anything.’’

Knicks coach Mike Woodson said Martin would seek a second opinion, but Martin said he already has seen a foot specialist who recommended prolonged rest.

“If it’s necessary to get a second opinion we will, but we’ve been fighting it for a while,’’ Martin said. “Sometimes you have to listen to your body, not your heart.’’

“It’s overuse,” Martin said. “Sprain it one day, come back, do it again. Can’t keep doing it over and over. There’s no timetable. We’ll relax and heal. It’s time to listen to the doctors, not myself.”

Woodson also gave no indication when Martin will be back.