My navigation bar is divided into 2 parts, which I have sections in one part and subsections in the other part. The number of sections and subsections is too much to fit in one line. I want them to be wrapped. I found the following code in a question answered some years ago, but it is written for wrapping sections. What change should I make on the code so that it works for subsections too?
Here is the code:
\makeatletter
\def\insertsectionnavigationhorizontal#1#2#3{%
\hbox to #1{{%
\def\slideentry##1##2##3##4##5##6{}%
#2\hskip.3cm%
\newdimen\tmp@parbox%
\setlength\tmp@parbox{#1}%
\addtolength\tmp@parbox{-.6cm}%
\parbox{\tmp@parbox}{\raggedleft%
\usebeamerfont{section in head/foot}\usebeamercolor[fg]{section in head/foot}%
\setbox\beamer@sectionbox=\hbox{}%
\ht\beamer@sectionbox=1.875ex%
\dp\beamer@sectionbox=0.75ex%
\hskip-1.875ex plus-1fill\dohead%
\box\beamer@sectionbox}\hfil\hskip.3cm%
#3}}}
\makeatother