Some sample VCL for WordPress

Ignoring AJAX requests

if (req.http.X-Requested-With == "XMLHttpRequest") {
    return(pass);
}

Post requests will not be cached

if (req.http.Authorization || req.method == "POST") {
  return (pass);
}

Only caching GET or HEAD requests

This makes sure the POST requests are always passed.

if (req.method != "GET" && req.method != "HEAD") {
  return (pass);
}

Preventing post and edit pages from being cached

if (req.url ~ "(wp-admin|post\.php|edit\.php|wp-login)") {
    return(pass);
}
if (req.url ~ "/wp-cron.php" || req.url ~ "preview=true") {
    return (pass);
}