Let \Theta k1,\cdot \cdot \cdot ,k\ell denote the generalized theta graph, which consists of \ell internally disjoint paths with lengths k1, \cdot \cdot \cdot ,k\ell , connecting two fixed vertices. We estimate the corresponding extremal number ex(n, \Theta k1,\cdot \cdot \cdot ,k\ell ). When the lengths of all paths have the same parity and at most one path has length 1, ex(n, \Theta k1,\cdot \cdot \cdot ,k\ell ) is O(n1+1/k\ast ), where 2k\ast is the length of the smallest cycle in \Theta k1,\cdot \cdot \cdot ,k\ell . We also establish a matching lower bound in the particular case of ex(n, \Theta 3,5,5).