The overhead press can be performed either with a curved bar path and little body movement, or a more vertical bar path and more body movement. These can be considered two different lifts.
In the overhead press, the bar starts in front of the shoulders, and ends directly above the shoulders. This means that if the lifter is standing upright, the bar must move backwards during the lift. However, the lifter does not necessarily need to be standing upright. An alternative is to push the hips forwards and shoulders back by hyperextending the hips or spine, such that the bar starts over mid-foot and the shoulders start behind the mid-foot. The lifter then presses the bar straight up and, near the top of the lift, moves the shoulders forward so they are under the bar.
Pressing with a curved bar path and minimal change in body position is often called a "strict" or "military" press, and pressing with a vertical bar path and more sagittal shoulder movement is often called a "classic", "Olympic", or "layback" press. But really these are just the ends of a spectrum, and one's pressing style can be any combination of these two.
The strict press is easier to visualise, so here's a diagram explaining the forward hip movement, layback and vertical bar path seen in a classic press, from Starting Strength 3rd Ed:
Neither of these two distinct styles is correct or incorrect, they're just different variations on the lift, and they serve slightly different purposes. The strict press is more of a pure deltoids and triceps exercise, so is probably better for hypertrophy of those muscles, whereas the classic press is more of a whole body movement, also utilising the pectorals and abs to a significant degree, and allowing you to lift more weight, which is important if you're performing this lift for competitive purposes, such as in strongman or strengthlifting.
Finally, the StrongLifts example is probably adding to the confusion, because the author states that the bar path should be vertical, but then in his video demonstration performs more of a strict press, where the bar path can be seen moving forwards as it passes his face, and then backwards at the top of the lift.