[Tex/LaTex] Removing header on chapter page

chaptersfancyhdrheader-footersectioning

I am using the fancyhdr package where from what I understand the default is no header on the chapter pages, but I still have the header displaying the section name on all my chapter pages. I would like to still have the footer with the page number, but not the header.

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}} % set the \leftmark
\fancyhf{}
\fancyhead{}
\fancyhead[RO, LE]{\leftmark} % 1. sectionname
\fancyfoot[C]{\thepage}
\fancypagestyle{plain}{
\renewcommand{\headrulewidth}{0pt}
}

Best Answer

Since \chapter uses \thispagestyle{plain}, the \fancypagestyle{plain} redefinition must disable the \fancyhead[RO,LE]{...} from fancy style, i.e. say \fancyhead{} in \fancypagestyle{plain}{...}.

\documentclass{book}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}} % set the \leftmark
\fancyhf{}
\fancyhead{}
\fancyhead[RO, LE]{\leftmark} % 1. sectionname
\fancyfoot[C]{\thepage}
\fancypagestyle{plain}{%
\fancyhead{}%
\renewcommand{\headrulewidth}{0pt}
}

\usepackage{blindtext}
\begin{document}


\chapter{First}
\section{First section}
\blindtext[10]
\chapter{Second}

\section{First section in 2nd chapter}
\blindtext[10]


\end{document}

enter image description here