By using a high order sandwich beams theory which is modified by considering the transverse flexibility of the core, free vibration characteristics of two models of sandwich beams are studied in this paper. In type-I, functionally graded layers coat a homogeneous core, and in type-II, an FG core is covered by homogeneous face sheets. To increase the accuracy of the model of the FGM properties, even and uneven porosity distributions are applied, and all materials are considered temperature-dependent. Nonlinear Lagrange strain and thermal stresses of the face sheets and in-plane strain of the core are considered. To obtain the governing equations of motion, Hamilton’s principle is used and a Galerkin method is used to solve them for simply supported and clamped boundary conditions. To verify the results of this study, they are compared with the results of literatures. Also, the effect of variation of temperature, some geometrical parameters and porosities on the frequency are studied.