Story highlights Walker's recent hardline stance on China is at odds with his record as Wisconsin's governor

But Walker said there's no conflict between his positions due to the different priorities of a governor and president

Washington (CNN) Wisconsin Gov. Scott Walker said Friday that Chinese leaders should be taken "to the woodshed," not the White House, and argued that his support for China as governor was not at odds with a new, hardline stance he's taken while running for president.

Earlier this week, Walker called on President Barack Obama to cancel a state dinner with Chinese President Xi Jinping because of allegations of cyberattacks and militarization of the South China Sea. But as governor, he lobbied to meet personally with Xi in 2013 and appeared on China's state-run television in 2012.

"Governors aren't about foreign policy, they're about trade, which is exactly what I've done and many other great governors have done across the country," Walker told CNN's Jim Sciutto. "Why would we be giving one of our highest honors, an official state visit, to a country that has been involved in something that directly has attacked our own government? It just doesn't make any sense. If anything, we should be taking them to the woodshed on this issue, not to the White House."

But when pressed by Sciutto, Walker said there's no conflict in the China stances, because a governor's job is to promote trade and a president's job is to set foreign policy.

"So the reason I'm talking about it is not because I'm a governor today. The reason I'm talking about it is because I'm running for president of the United States. And I'm going to be in a position to affect that," Walker said.

Read More