Never mind that David Ortiz, as a former member of the Boston Red Sox, wasn’t going to be visiting the White House with the team that won the World Series last year.

He expressed solidarity with Manager Alex Cora and other players who said they will skip Thursday’s visit with President Trump in Washington. And Ortiz did it in the plain-spoken manner he used to lift Bostonians before a Fenway Park game shortly after the Boston Marathon bombing. “This is our f------ city, and nobody is going to dictate our freedom. Stay strong.”

Ortiz was just as passionate when it comes to visiting Trump.

“I’m an immigrant. When it comes down to the political side of it, I don’t know much about politics and things like that, but when it comes down [to] the way immigrants have been treated, it’s something that goes a long way,” Ortiz, who was born in the Dominican Republic, told WEEI earlier this week. “You don’t want to go and shake hands with a guy who is treating immigrants like [expletive] because I’m an immigrant.”

Cora, who was born in Puerto Rico, has been critical of the president’s handling of disaster relief after Hurricane Maria devastated the island in 2017. Earlier this week, Trump said that the island had been given $91 billion in aid, a sum The Post’s Fact Checker gave three Pinnochios. Cora explained that his decision was “made with a lot of conviction. . . . I don’t feel comfortable going to a celebration while we’re living what we’re living back home.”

If Ortiz, who became a U.S. citizen in 2008, were still playing, he’d join Cora in sitting this one out. “Of course, bro,” he said. “Alex is in a tough spot right now, going there and acting like nothing is happening. It’s like you are going to shake hands with the enemy. Think about it, all the stuff that has been going on since he took office. People are angry. People are mad. He has divided people, that’s how it feels like.”

Ortiz played for the Red Sox from 2003 until he retired in 2016 and visited George W. Bush in the White House after the team’s 2004 and 2007 championships and Barack Obama after its 2013 championship. In fact, he pulled off a viral Samsung selfie stunt with Obama.

“I experienced George Bush a couple of times and then Obama. Other than that everything was pretty much the same,” Ortiz said. “Really well-organized and you get excited about going and seeing the president. But nowadays with all the controversy going on with the president we have now and the sports teams not wanting to go, it’s more of a challenge.”

The decision for the 2019 Red Sox appears to be split along racial lines, with Mookie Betts, Xander Bogaerts, Jackie Bradley Jr., Rafael Devers, Sandy Leon, Eduardo Nunez, David Price, Christian Vazquez and Hector Velazquez declining to attend the ceremony. The other roughly 20 players, some of whom are on the injured list, have either said they will attend or are presumed to be doing so.

“Put it this way, in sports, it’s more likely a big percentage of black people and Spanish people are descendants from immigrants,” Ortiz said. “So once you see what is going in this country based on being an immigrant or being black it’s something that goes beyond going into the White House and shaking hands with the president just because. That’s the situation that everyone is facing right now. I’m not saying everything Donald Trump is doing is bad, but I guess he started off on the wrong foot.

“This is critical. What is going on right now is critical. Listen, when I first came into this country the one thing I always have been proud of is learning how to stay together. That’s one thing that I’m proud of coming into this country. That’s not the situation right now.”

Those opting out of the trip are all people of color. Those who were planning to attend are white, except for J.D. Martinez, who is of Cuban descent. As the Athletic’s Boston sports columnist Steve Buckley tweeted, “[B]asically, it’s the white Sox who’ll be going.” Price said he planned to skip the visit because, as he said in an MLB Network interview, “it’s baseball season.” Velazquez, who is from Mexico, said he chose not to go because Trump “has said a lot of stuff about Mexico.”

Political differences have intruded on White House visits by sports teams before, but they’ve intensified during the Trump administration. Members of the 2017 Philadelphia Eagles and the 2016-17 Golden State Warriors decided against the White House visit, only to have Trump subsequently rescind the invitations. The president also was criticized for serving fast food to members of the 2018 Clemson football team, something that has become a tradition. Some members of the New England Patriots have made clear they wouldn’t attend a White House celebration.

There was no such debate for Tiger Woods, a golfing and business partner of Trump. On Monday, the Masters champion, who is of African American and Asian descent, accepted the Presidential Medal of Freedom — one of the nation’s highest civilian honors — from Trump in a Rose Garden ceremony.

Read more from The Post: