Header and footer only displayed on Chapter pages, but not on non-chapter pages

fancyhdr

I am using fancyhdr to set headers and footers. However, those are only displayed on chapter pages. Non chapter pages footers and headers are blank. Why is this the case?

Here is a MWE

% packages and general setup
\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[a4paper, width = 150mm, top = 25mm, bottom = 40mm, bindingoffset = 6mm]{geometry}
\AtBeginDocument{\renewcommand{\bibname}{References}}

% package and setup for header and footer
\setlength{\headsep}{25pt}
\setlength{\footskip}{20mm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\fancyhf{}
\setlength{\headheight}{14.49998pt}
\fancypagestyle{plain}{%  the preset of fancyhdr 
    \fancyhf{} % clear all header and footer fields
    \fancyhead{}
    \fancyhead[RO, LE]{\ifnum\value{chapter}>0 \thechapter \hspace{1pt} \leftmark \fi}
    \fancyfoot{}
    \fancyfoot[LE, RO]{\thepage}
    \fancyfoot[LO, RE]{Auther Name}
}

\begin{document}

\chapter{Introduction}
        \input{Chapter1}

\end{document}

Best Answer

The plain style is automatically applied to the first page of a chapter. The page number and other information are usually set in the footer of the page to maintain the layout of the chapter header.

\fancypagestyle{plain}{%  first page of chapters
    \fancyhf{} % clear all header and footer fields
    \fancyfoot[LE, RO]{\thepage}
    \fancyfoot[LO, RE]{Auther Name}
    \renewcommand{\headrulewidth}{0pt} % no rule
}

For the rest of the pages, you need to define a separate style (called fancy in this example) and apply it using \pagestyle{fancy}

\fancypagestyle{fancy}{%  all pages
    \fancyhf{} % clear all header and footer fields
    \fancyhead[RO, LE]{\leftmark}
    \fancyfoot[LE, RO]{\thepage}
    \fancyfoot[LO, RE]{Auther Name}
}

a

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[a4paper, width = 150mm, top = 25mm, bottom = 40mm, bindingoffset = 6mm]{geometry}
\AtBeginDocument{\renewcommand{\bibname}{References}}

% package and setup for header and footer
\setlength{\headsep}{25pt}
\setlength{\footskip}{20mm}
\setlength{\headheight}{15pt}

\usepackage{fancyhdr}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}

\fancypagestyle{plain}{%  first page of chapters
    \fancyhf{} % clear all header and footer fields
    \fancyfoot[LE, RO]{\thepage}
    \fancyfoot[LO, RE]{Auther Name}
    \renewcommand{\headrulewidth}{0pt} % no rule
}

\fancypagestyle{fancy}{%  all pages
    \fancyhf{} % clear all header and footer fields
    \fancyhead[RO, LE]{\leftmark}
    \fancyfoot[LE, RO]{\thepage}
    \fancyfoot[LO, RE]{Auther Name}
}
\pagestyle{fancy} % apply the stye <<<<<<<<<<<<<

\usepackage{kantlipsum} % ONLY for dummy text <<<<

\begin{document}

\chapter{Introduction}
\kant[1-6]

\chapter{First}
\kant[1-6]
    
\end{document}