I don't try to train this when they are excited or antsy. If the horse is
already trained to ride but just wasn't ever trained to stand for mounting,
I position them and say "Stand". I don't even try to get on. I fiddle with
the saddle, put weight in the stirrups, and just stand next to them. If
using a mounting block (reccommended), I step up and just stand next to
them. If they move at all, I reposition them and start again. If they don't
move, I click and reward.
When they stand still for the command "Stand" I begin mounting. If they
move as I'm mounting, I step back down, reposition them and start again. If
they don't move, I click and reward. It usually only takes a few times, if
they haven't been hurt before by mounting. I make sure to practice equally
from both sides. I gradually extend the time until I click so that the
horse continues to stand still while I get my stirrups, fiddle with the
pommel bag, adjust my sunglasses, etc. they learn not to go until I ask them
to move off. I use a longer process if they haven't been mounted before.
The horse below is being asked to move up to stand in front of the rider.
Or you can teach your horse to lay down for mounting :-)