The judge boosted defendant Weusi McGowan's bail from $250,000 to $1 million after the Monday incident.
Prosecutor Christopher Lawson says McGowan was upset because the judge refused to remove public defender Jeffrey Martin from the case.
McGowan had smuggled a bag of feces into court and spread it on Martin's hair and face before flinging the excrement at jurors. No jurors were hit.
McGowan has pleaded not guilty to kidnapping for robbery, assault with a deadly weapon and other counts in connection with a 2007 home invasion. He is accused of hitting a 54-year-old man with a rock in a sock and demanding money and drugs, reported the San Diego Tribune.
McGowan is also accused of tying up the man, ransacking his apartment and stealing his 1994 Ford Taurus, the newspaper reported.