By DARLENE SUPERVILLE, Associated Press

WASHINGTON (AP) — Vacation jaunts and hobnobbing with global elites at a Swiss ski resort are out for President Donald Trump. Visits with troops and farmers are OK.

Like some of his recent predecessors, Trump is carefully picking and choosing where he'll travel during the partial government shutdown.

He visited with U.S. troops stationed at a military base in western Iraq the day after Christmas and flew to the U.S.-Mexico border in southern Texas last week to try to buttress his argument for billions of dollars to build a wall to stem illegal immigration, drug trafficking and crime. He addressed the American Farm Bureau Federation's annual convention in New Orleans on Monday.

But Trump scrapped other trips that wouldn't have played well at a time when government workers are furloughed or working without pay.

He canceled plans to spend more than two weeks at his Palm Beach, Florida, estate for the Christmas and New Year's holidays. He also bagged a trip to a global economic forum in Davos, Switzerland, that had been set for next week, blaming "intransigence" by Democrats for his decision.

"It looks like the president is going ahead with trips that are more closely tied to official business and is avoiding trips that might have optics that are more difficult to justify during a shutdown," said Brendan Doherty, a political scientist at the U.S. Naval Academy who tracks presidential travel.

Doherty said it wasn't surprising that Trump would avoid his beloved Mar-a-Lago estate on Florida's southeastern coast, which he last visited at Thanksgiving.

Images of Trump headed out for a round of golf at his Florida club or mixing with elites in the Swiss Alps likely wouldn't go over well with the public, especially the 800,000 federal government employees who have either been idled or are working without pay for as long as some government functions remain on lockdown.

Trump and congressional Democrats are at loggerheads over the wall Trump wants to build along the U.S.-Mexico border. The impasse has spawned the longest shutdown in U.S. history and stalled funding for several major departments, including Homeland Security, Agriculture, Interior, Justice, State and Transportation.

Trump falsely claimed in a Fox News interview Saturday that he hasn't left the White House "in months" but liked "the symbol" of him staying in Washington, where snow blanketed the city over the weekend, while a group of House and Senate Democrats toured hurricane-ravaged Puerto Rico and attended a benefit performance of the hit Broadway musical "Hamilton." Representatives for House Speaker Nancy Pelosi of California and Senate Minority Leader Chuck Schumer of New York said both Democrats spent the weekend in Washington.

Even the Iraq and southern border trips ended up being colored by the president's politics.

Visiting U.S. troops abroad is a tradition for the commander in chief, but Trump was criticized for the overtly political tone of his speech at al-Asad Airbase, where he hammered congressional Democrats for refusing to fund the border wall.

Other Trump critics saw the visit to the Mexican border town of McAllen, Texas, as being more about fulfilling a campaign promise to build a wall than about achieving a serious policy goal.

The White House insists the president is focused on keeping the oath he took to protect the American people.

Past presidents who governed during shutdowns also canceled some trips and arranged others to try to pressure the opposition or influence public opinion. One president used the first lady as a stand-in.

President Barack Obama canceled a weeklong trip to Southeast Asia that fell during a 16-day government shutdown in the fall of 2013. The White House at the time cited the "difficulty in moving forward with foreign travel in the face of a shutdown."

Some presidential travel, especially abroad, can be challenging when government is shut down because aides who help set up such trips are often furloughed.

But Obama didn't completely ground himself. In an attempt at pressuring the opposition, Obama traveled to a Maryland construction firm to challenge Republican congressional leaders to end the impasse.

President Bill Clinton took a one-day break during a 21-day shutdown that stretched from in mid-December 1995 into 1996, heading to Hilton Head, South Carolina, for an annual beachfront gathering of movers and shakers. Some of his aides were concerned about the optics of Clinton schmoozing with the moneyed set while parts of the government were shut down. But Clinton's decision was eased when House Speaker Newt Gingrich and Senate Majority Leader Bob Dole also made plans to spend the New Year's holiday outside of Washington.

President Ronald Reagan opened a three-day state visit to Japan on Nov. 9, 1983, the day before a three-day government funding lapse, according to a State Department list of presidential foreign travel.

In October 1979, President Jimmy Carter sent his wife, Rosalynn, to Boston to welcome Pope John Paul II, who arrived during an 11-day shutdown.

___

AP News Researcher Jennifer Farrar in New York contributed to this report.

___

Follow Darlene Superville on Twitter: http://www.twitter.com/dsupervilleap