Donald Trump appeared by videoconference at his trial on Tuesday, where he is judged for 34 accounting frauds occurred during the 2016 presidential election campaign. The former US president was banned from posting elements of the trial on social networks.

A frustrated-looking Donald Trump appeared in a New York court via video-link Tuesday to be informed by a judge that he cannot post certain evidence in his criminal case on social media.

Trump denies 34 counts of falsifying business records to cover up alleged hush money paid to porn star Stormy Daniels in 2016.

He became the first former or sitting president to ever be charged with a crime during a historic arraignment in Manhattan in April.

Judge Juan Merchan told Trump that he is barred from disclosing sensitive materials that the prosecution will hand over to his lawyers, so they can prepare their defense.

Trump shook his head when the judge said that he could be held in contempt of court if he violated the order.

The 76-year-old is allowed to post information already in the public domain and most evidence compiled by his own team, however.

But he is prohibited from publicizing the names of some employees of the Manhattan district attorney Alvin Bragg, the prosecutor in the case, until the trial begins.

The district attorney’s office cited Trump’s track record of attacking witnesses and Bragg in social media posts.

Trump’s attorneys argued against the protective order, claiming it would be an unprecedented “muzzle” on a presidential candidate.

Merchan stressed that his ruling does not amount to a gag order, and that Trump is still free to talk about the case and campaign to regain the presidency next year.

The judge said the trial would begin on March 25 next year, meaning the historic proceedings will likely start in the thick of the Republican primaries for the 2024 presidential race.

The charges relate to reimbursements made to Trump’s then-lawyer Michael Cohen for the $130,000 payment to Daniels made just weeks before Trump’s election victory.

Prosecutors say the money was intended to silence Daniels, whose real name is Stephanie Clifford, over sex she says she had with Trump in 2006.

They claim that Trump covered up the true nature of the payments.

The criminal case is one of several legal challenges that threaten to derail Trump’s 2024 election bid.

Miroslava Salazar with AFP