Conditional navigation bar on custom beamer theme

I'm trying to create a custom beamer template. However, I can't make the navigation bar to correctly behave in the title page.

As shown in the image, where the navigation bar is supposed to be I get a white bar instead of the navigation bar. How can I make it totally invisible, so the background fill the entire frame? And while maintaining the navigation bar on the other slides.

As you can see, I tried several things:

• To rewrite the \titlepage command to automatically redefine the headline part, but it didn't work. BONUS: I would really like a solution on these lines, as it allows me to also remove footlines, or other tweaks that need to be removed from the title page. However, I can't control the expansion of the declared macros.
• To manually reset headline before calling it in the example. However, I would prefer an automatic solution.
• To add a condition (\ifnum\thepage>1\relax) on the headline to behave differently for the first page, but it removes the navigation bar from the first slide too. This was the closest to a solution I got.

The code is:

\documentclass[compress]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tikz}

\title{There Is No Largest Prime Number}
\date[ISPN ’80]{27th International Symposium of Prime Numbers}
\author[Euclid]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}

%\usetheme{udp}

%% Color theme
\definecolor{frontColor}{RGB}{119,95,85}%MedianBrown
\definecolor{firstColor}{RGB}{148,182,210}%MedianLightBlue
\definecolor{secondColor}{RGB}{221,128,71}%MedianOrange

% Settings
\setbeamercolor*{author}{fg=white}
\setbeamercolor*{date}{fg=white}
\setbeamercolor*{item}{fg=secondColor}

%% beameroutertheme
% I need to change this to behave differently on the title page
{%
%\ifnum\thepage>1\relax%
\begin{tikzpicture}
\useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);
\fill[secondColor] (0,0) rectangle(0.3,0.6);
\fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);
\end{tikzpicture}
\end{beamercolorbox}
%\fi
}

% Frame title
\defbeamertemplate*{frametitle}{udp}[1][]
{%
\vskip-1pt%skip after the begginning of the slide
\begin{beamercolorbox}[wd=\paperwidth,ht=0.6cm]{frametitle}
\begin{tikzpicture}
\useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);
\fill[secondColor] (0,0) rectangle(0.3,1);
\fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);
{\node[anchor=west, white,font=\large] at (0.4,0.3){\insertframetitle};}
\end{tikzpicture}
\end{beamercolorbox}
}

%% beamerinnertheme
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fill[color=frontColor] (0,2) rectangle (\the\paperwidth,\the\paperheight);
\fill[color=secondColor] (0,0) rectangle(2.95,1.9);
\fill[color=firstColor] (3.05,0) rectangle(\the\paperwidth,1.9);
\ifnum\thepage>1\relax%
\fill[white,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fi
\end{tikzpicture}
}

% Title page
\defbeamertemplate*{title page}{udp}[1][]
{%
%do the title page
\vskip0.5cm%
\begin{minipage}[r]{\linewidth}
\begin{flushright}
% logo goes here
\end{flushright}
\end{minipage}
\vskip0.5cm%
\begin{minipage}[t][5cm][b]{\textwidth}
\usebeamerfont{title}\inserttitle\par%
\end{beamercolorbox}%
\end{minipage}
\vskip0.5cm%
\begin{minipage}[c][1.6cm][c]{\textwidth}
\begin{beamercolorbox}[wd=\the\paperwidth,leftskip=3.5cm,#1]{author}
\usebeamerfont{author}\insertauthor%
\end{beamercolorbox}
\vskip0.2cm%
\begin{beamercolorbox}[wd=\the\paperwidth,leftskip=3.5cm,#1]{date}
\usebeamerfont{author}\insertdate%
\end{beamercolorbox}
\end{minipage}
\vfill
}

% I also tried to fix the title page navigation bar by redefining the title command
%\def\oldtitlepage\titlepage

% Items
\setbeamertemplate{items}[square]
\setbeamertemplate{sections/subsections in toc}[square]

\begin{document}
{% I tried to remove the headline here
\begin{frame}
\titlepage
\end{frame}
}
\section{First section}
\subsection{1}

\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number. \end{theorem}
\end{frame}

\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number. \end{theorem}
\end{frame}

\end{document}


The conditional you are trying to set can be achieved using \insertframenumber:

\ifnum\insertframenumber>1\relax%
<code for the naviagtion bar>
\fi


A complete example:

\documentclass[compress]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{tikz}

\title{There Is No Largest Prime Number}
\date[ISPN ’80]{27th International Symposium of Prime Numbers}
\author[Euclid]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}

%\usetheme{udp}

%% Color theme
\definecolor{frontColor}{RGB}{119,95,85}%MedianBrown
\definecolor{firstColor}{RGB}{148,182,210}%MedianLightBlue
\definecolor{secondColor}{RGB}{221,128,71}%MedianOrange

% Settings
\setbeamercolor*{author}{fg=white}
\setbeamercolor*{date}{fg=white}
\setbeamercolor*{item}{fg=secondColor}

%% beameroutertheme
% I need to change this to behave differently on the title page
{%
\leavevmode
\begin{tikzpicture}
\useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);
\fill[secondColor] (0,0) rectangle(0.3,0.6);
\fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);
\end{tikzpicture}
\end{beamercolorbox}
\fi
\vskip-17pt% Hack: just to prevent overfull \vboxes
}

% Frame title
\defbeamertemplate*{frametitle}{udp}[1][]
{%
\vskip-1pt%skip after the begginning of the slide
\begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle}
\begin{tikzpicture}
\useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);
\fill[secondColor] (0,0) rectangle(0.3,1);
\fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);
{\node[anchor=west, white,font=\large] at (0.4,0.3){\insertframetitle};}
\end{tikzpicture}
\end{beamercolorbox}
}

%% beamerinnertheme
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fill[color=frontColor] (0,2) rectangle (\the\paperwidth,\the\paperheight);
\fill[color=secondColor] (0,0) rectangle(2.95,1.9);
\fill[color=firstColor] (3.05,0) rectangle(\the\paperwidth,1.9);
\ifnum\thepage>1\relax%
\fill[white,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fi
\end{tikzpicture}
}

% Title page
\defbeamertemplate*{title page}{udp}[1][]
{%
%do the title page
\vskip0.5cm%
\begin{minipage}[r]{\linewidth}
\begin{flushright}
% logo goes here
\end{flushright}
\end{minipage}
\vskip0.5cm%
\begin{minipage}[t][5cm][b]{\textwidth}
\usebeamerfont{title}\inserttitle\par%
\end{beamercolorbox}%
\end{minipage}
\vskip0.5cm%
\begin{minipage}[c][1.6cm][c]{\textwidth}
\begin{beamercolorbox}[wd=\the\paperwidth,leftskip=3.5cm,#1]{author}
\usebeamerfont{author}\insertauthor%
\end{beamercolorbox}
\vskip0.2cm%
\begin{beamercolorbox}[wd=\the\paperwidth,leftskip=3.5cm,#1]{date}
\usebeamerfont{author}\insertdate%
\end{beamercolorbox}
\end{minipage}
\vfill
}

% I also tried to fix the title page navigation bar by redefining the title command
%\def\oldtitlepage\titlepage

% Items
\setbeamertemplate{items}[square]
\setbeamertemplate{sections/subsections in toc}[square]

\begin{document}
{% I tried to remove the headline here
\begin{frame}
\titlepage
\end{frame}
}
\section{First section}
\subsection{1}

\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number. \end{theorem}
\end{frame}

\begin{frame}
\frametitle{There Is No Largest Prime Number}
\framesubtitle{The proof uses \textit{reductio ad absurdum}.}
\begin{theorem}
There is no largest prime number. \end{theorem}
\end{frame}

\end{document}


• your code adjusts title page but navigation disappears also from successive slides. I think OP wants avoid navigation bar only from title page. – Ignasi Mar 6 '14 at 7:11
• Just as @Ignasi said, I need the navigation bar to appear in all the other slides. I'm not sure if is the best solution, but trying to change the command that produces the title page may be easy? But the problem is that redefining the command doesn't seem to work. – adn Mar 6 '14 at 11:20