Image Source
What are the riots all about?
First of all, a quick politics lesson. The riots started back in November 2013. A group of protestors, organised and led by former Surat Thani politician Suthep Thaugsuban, decided that the current government should step down. In their view, Prime Minister Yingluck Shinawatra and her ministers are too corrupt to be leading the nation. They have close ties with previous Prime Minister Thaksin Shinawatra, who happens to be Yingluck's brother.
Image Source
The demonstrators have been occupying key commercial and business areas in Bangkok and, more recently, have spread to other towns and cities. Shinawatra has responded by defending her right to rule, arguing that she represents democracy in Thailand. Unfortunately, matters have become increasingly violent and eleven people have died as a direct result of the unrest. It's terribly sad, but it is possible to spend time in Bangkok while staying safe.
Image Source
Avoid riot areas
Even though the international media has a habit of sensationalising crises, making them appear widespread and bloody, the Bangkok rioting is not as extreme as all that. For the most part, every day operations, such as transport and basic services, have not been hindered. What's more, the protests haven't taken over the entire metropolis. They're pretty much confined to particular zones.
So, before leaving your accommodation, find out where the demonstrators are planning on being that day - and stay out of the area. You'll soon discover that, in most streets in the city, it's business as usual.

Image Source
Stay close to public transport links
Find a Bangkok hotel that's near the city's transport systems - either the MRT or the Skytrain. This will help matters in a few ways. First of all, it means that you can avoid walking long distances unnecessarily. Second, it allows you to make a quick getaway - should things become heated in your area all of a sudden. Third, it prevents you being stuck in horrendous traffic. One of the most frustrating aspects of the riots is that they've made the already hectic Bangkok roads even slower and more difficult to navigate than usual. Catching a taxi is likely to take forever.

Image Source
Know how to reach your embassy
If you do get into danger of any kind, you're pretty much guaranteed of protection at your embassy. That's partly why they exist. So, before leaving home, work out whereabouts in Bangkok yours is located and figure out the quickest way of getting there. This should give you some peace of mind.
Stay connected
Perhaps the most important thing of all is to stay connected and remain informed. Even though Bangkok is still relatively safe for international travellers who stay away from the centre of the action, that doesn't meant that the situation can't change quickly and unpredictably.
Image Source
Get hold of a smartphone and a local SIM card that facilitates internet access. Keep a close eye on twitter accounts and news agencies that provide frequent updates, as well as your government's travel advisory pages. As much as there's no reason to feel terrified or cancel travel plans, it definitely pays to remain wary and alert.