Let $mathbb{F}_{p^{n}}$ be the finite field with $p^n$ elements and $operatorname{Tr}(cdot)$ be the trace function from $mathbb{F}_{p^{n}}$ to $mathbb{F}_{p}$, where $p$ is a prime and $n$ is an integer. Inspired by the works of Mesnager (IEEE Trans. Inf. Theory 60(7): 4397-4407, 2014) and Tang et al. (IEEE Trans. Inf. Theory 63(10): 6149-6157, 2017), we study a class of bent functions of the form $f(x)=g(x)+F(operatorname{Tr}(u_1x),operatorname{Tr}(u_2x),cdots,operatorname{Tr}(u_{tau}x))$, where $g(x)$ is a function from $mathbb{F}_{p^{n}}$ to $mathbb{F}_{p}$, $taugeq2$ is an integer, $F(x_1,cdots,x_n)$ is a reduced polynomial in $mathbb{F}_{p}[x_1,cdots,x_n]$ and $u_iin mathbb{F}^{*}_{p^n}$ for $1leq i leq tau$. As a consequence, we obtain a generic result on the Walsh transform of $f(x)$ and characterize the bentness of $f(x)$ when $g(x)$ is bent for $p=2$ and $p>2$ respectively. Our results generalize some earlier works. In addition, we study the construction of bent functions $f(x)$ when $g(x)$ is not bent for the first time and present a class of bent functions from non-bent Gold functions.