I'm very new to StackExchange, let alone LaTeX. The issue here is temporarily adding a frame title to whichever frame comes right after a new subsection is defined. Following is a sample code with an empty ribbon left behind on the first slide.
\documentclass{beamer}
\usepackage{lipsum}
\usetheme{Frankfurt}
\AtBeginSubsection[]
{
\addtobeamertemplate{frametitle}{\let\insertframetitle\insertsubsectionhead}{}
}
\makeatletter
\CheckCommand\beamer@checkframetitle{@ifnextchar\bgroup\beamer@inlineframetitle{}}
\renewcommand\beamer@checkframetitle{\global\let\beamer@frametitle\relax@ifnextchar\bgroup\beamer@inlineframetitle{}}
\makeatother
\begin{document}
\section{Introduction}
\begin{frame}
\lipsum[2]
\end{frame}
\subsection{XYZ}
\begin{frame}
\lipsum[2]
\end{frame}
\end{document}
Basically wanting a similar set-up to this but only for the first frame right after a new subsection starts, without any permanent impact to other frames/frame titles (like said empty ribbons on pages).
EDIT: Found this link which got 90 percent of the job done, but the subsection frame title disappears if overlay specifications (like \uncover) are present in the same frame, as well as displaces individual frame titles (that makes sense).
TLDR for edit: stays only on first slide after new subsection, not same frame.
\documentclass{beamer}
\usepackage{lipsum}
\usetheme{Frankfurt}
\makeatletter
\newcommand<>{\insertsubsectiontitle}{\frametitle{\insertsubsection}}
\let\oldbeamer@checkframetitle\beamer@checkframetitle% Store the \frametitle checking mechanism
\renewcommand<>{\subsection}{%
\gdef\beamer@checkframetitle{% Update \frametitle checking to ...
\insertsubsectiontitle% ...insert the section title and...
\global\let\beamer@checkframetitle\oldbeamer@checkframetitle% ...revert to it's old definition
}% Regular \section stuff follows
\alt#1{@ifnextchar[\beamer@subsection\beamer@@subsection}
{\beamer@secgobble}}
\makeatother
\begin{document}
\section{Introduction}
\begin{frame}
\lipsum[2]
\end{frame}
\subsection{XYZ}
\begin{frame}
\lipsum[2]
\end{frame}
\end{document}