For SMTs, you can use a cyanoacrylic adhesive (CA). Most CA's will simply go up in fumes with heat during soldering. If it doesn't, it is not a problem to leave it on the board, under the component after soldering.
The trick is to get a small enough "dot" to hold the component without spreading onto the solder pads. I apply the CA as a small drop to a non-reactive surface. An old piece of PCB works well. You want to avoid any surface that acts like a "base," as in acid/base. Then, I use a piece of steel music wire (0.032 to 0.050 " diameter) to place a very small spot of the adhesive onto the PCB. Add the component, press down, and it will stay. I use thin CA with a set time of about 10 seconds; however, on a non-reactive surface (i.e., the big drop), it will not set-off and get hard for quite awhile. Older CA may be better in that regard than the really fresh stuff. Once you press the component in place, it will harden quite quickly. If you need to change the orientation after the CA gets hard, just heat the component to soldering temperature and the CA will loosen.
All that being said, I find a little paste flux works almost as well and is quicker in most cases, except you sometines have to keep a little pressure on the components to keep them from moving during the soldering process. I use the same wire as used for the CA procedure for that purpose. John