Dorsal vs Posterior and Ventral vs Anterior
Short Answer 
This page on wikipedia gives a good synopsis of these concepts.
The confusion lies in the fact that many websites on anatomy discuss/describe/define these terms in relation to humans. However, in quadrupeds and fish (and  birds), Anterior/Posterior lies orthogonal to Ventral/Dorsal and are instead synonymous with Cranial(Rostral)/Caudal. Examining the etymologies of the 4 terms in question will demonstrate why there seems to be an inconsistency in their usage:
Ventral -&gt; &quot;belly&quot; side
Dorsal -&gt; &quot;back&quot; side
Anterior -&gt; &quot;before&quot; or &quot;toward the front&quot;
Posterior -&gt; &quot;after&quot; or coming after (opposite to) the anterior 

Based on the body orientation of the organism (often associated with forms of locomotion), these terms can sometimes overlap (as in bipedal humans) but often lie perpendicular to each other (as in quadrupeds, fish and most birds).

A note about quadrupedalism (as summarized on Wikipedia [my emphasis added]):

Although the words quadruped and tetrapod are both derived from terms meaning &quot;four-footed&quot;, they have distinct meanings. A tetrapod is any member of the taxonomic unit Tetrapoda (which is defined by descent from a specific four-limbed ancestor) whereas a quadruped actually uses four limbs for locomotion.




 Long Answer 
Think of ventral (Latin venter = &quot;belly&quot;) as being associated with the belly side (with belly referring to &quot;swelling&quot; or &quot;inflating&quot;) -- or typically the side of the organism containing the digestive and respiratory organs. Dorsal (from Latin dorsum meaning &quot;back&quot;) refers to the body region/&quot;side&quot; opposite that of ventral (and typically called the &quot;back&quot;).
Anterior (from Latin ante meaning &quot;before&quot; or &quot;in front of&quot;) refers to the &quot;front&quot; of the organism (i.e., the part of the organism you'd encounter 1st or before other body regions). Posterior (from Latin, comparative of posterus (&quot;following&quot;) from post- meaning &quot;after&quot;) is the opposite and refers to the part of the organism encountered &quot;after&quot; (or opposite) the anterior side.
Depending on the orientation of the organism, these terms may be synonymous in some instances but be orthogonal in other instances).

Sometimes anterior/posterior would be synonymous with ventral/dorsal, as is the case in humans or other bipedal organisms.
In other instances (e.g., in quadrupeds, fish or birds), posterior/anterior lies relatively orthogonal to the dorsal/ventral orientation. In these cases, dorsal/ventral is instead synonymous with superior (from Latin superior, comparative of superus &quot;that is above,&quot; from super &quot;above&quot;) and inferior (from Latin inferus meaning &quot;low&quot; or &quot;below&quot;).

Often in these cases, anterior/posterior are instead associated with caudal/cranial (common alternatives for cranial  include cephalic or rostral).  Caudal (from Latin cauda meaning &quot;tail&quot;) refers to the tail side of the organism (i.e., the side associated with coccygeal vertebrae or sometimes simply the side of the organism where waste is excreted). Conversely, cranial (Greek kranion = &quot;skull&quot;) or  cephalic (from Latin cephalicus, from Greek kephalikos, from kephalē meaning &quot;head&quot;) refer to the side of the organism containing the head. Rostral (referring to rostrum from Latin meaning &quot;beak&quot;) is another synonym for cranial and refers to being &quot;situated or occurring near the front end of the body, especially in the region of the nose and mouth or (in an embryo) near the hypophyseal region.&quot;

Some notes:

This English.SE question addresses etymology of the suffix &quot;-erior.&quot;

You can find a pretty good list of anatomical etymologies here, here, here, or by simply searching &quot;[word of interest]  etymology&quot; in Google.

Also, this Bio.SE post addresses anatomical terminology usage in plants and body organs.



More generally, a frontal plane always divides an organism into ventral/dorsal.


Although these terms differ between shapes/orientations of organisms, using such terms for more specific body parts (e.g., heads or feet) are not always as inconsistent.

For example, anatomical positional terminology for brains is consistent across organisms.


One final note:
This approach to anatomical positional terminology only works with bilaterally symmetrical organisms. See here for terminology usage for other organisms.