Let's start from the definition of enthalpy change (not going to formal definition because it's very non-intuitive) here's how I like to define it:
Enthalpy change is the amount of heat absorbed ($\mathrm dH\gt0$) or given ($\mathrm dH\lt0$) by the system at constant pressure of system.
$$
\mathrm dH=Q_p
$$
$$
\begin{array}{l}
\therefore \mathrm d U=Q_p+W \\
\Rightarrow Q_p=\mathrm dU-W=\mathrm dU+p_{\text{ext}}\, \mathrm dV
\end{array}
$$
Now as the pressure of the ideal gas system is constant so it must be equal to the external pressure.
$$
\begin{array}{l}
p_{\text{ext}}=p_\mathrm g \\
\Rightarrow p_\mathrm g=\frac{nRT}{V_\mathrm g}
\end{array}
$$
$$
\begin{array}{l}
\Rightarrow p_\mathrm g V_\mathrm g=nRT\\
\Rightarrow p_\mathrm g\mathrm dV=nR\,\mathrm dT=p_{\text{ext}}\,\mathrm dV
\end{array}
$$
The above equation is valid only if the composition of the gas does not change. Now using this equation
$$
\begin{aligned}
\mathrm dH &=\mathrm dU+p_{\text{ext}}\,\mathrm dV \\
&=\mathrm dU+nR\,\mathrm dT
\end{aligned}
$$
Now as we know that $\mathrm dU$ is a function of temperature only for ideal gas (as according to the kinetic theory of gases there is no intermolecular interaction between molecules of ideal gases so they possess kinetic energy only which itself is a function of temperature only) so we can say that
$$\mathrm dH=f(T)$$
That is, enthalpy change of an ideal gas is only a function of temperature given that the composition of ideal gas system do not change.
Please do correct me if I am getting something wrong.