Here is a cute idea: https://www.hometalk.com/1971238/repurposed-coat-rack-to-coffee-cup-holder
Single cup/mug ,with coffee in it ?? or do you mean a rack of some sort?? here are quite a few to make https://www.youtube.com/results?search_query=DIY+coffee+cup+racks+for+wall more ideas https://www.youtube.com/watch?v=Ur2HS2g-W3Q more ideas https://www.youtube.com/watch?v=FYDujGJTtPc for the single cup w/ coffee in it- you can get ones made for boats---seriously no room for even small table, these work great in Rvs,on deck railings,posts on patios https://express.google.com/u/0/product/18241029397808148194_7694067405559333610_115835776?utm_source=google_shopping&utm_medium=tu_cu&utm_content=eid-lsjeuxoeqt>im=CMvExdOd1I2s0wEQ9rbmwYX5_fs7GNC7jAUiA1VTRCiQ36PmBTCAh543&utm_campaign=115835776&gclid=EAIaIQobChMI6tP9qtbh4QIVeh-tBh38lAj3EAQYBSABEgIq__D_BwE
I took a piece of white floor molding and ran some long gold eye hooks into it wide enough to hang the mugs by their handles. The hooks were long enough that the mugs weren't jammed tight and were easy to hang and remove. And being gold added a little extra zing. I used eye hooks and shorter gold hooks to hang the rack on the wall. Note that mine is 24" long because that is the distance between my studs but you could make it whatever size you want. Just make sure that it is sturdley attached to the wall to hold the weight of the mugs plus the movement of hanging and removing the mugs.