I'm using titlesec
to set my page style in a book class. If I include an appendix, the header corresponding to the first chapter is "Appendix 1" instead of "Chapter 1".
\documentclass{book}
\usepackage[pagestyles]{titlesec}
\newpagestyle{main}[\scshape]{%
\sethead
[\thepage][][\chaptertitlename\space\thechapter. \chaptertitle]
{\ifthesection{\thesection\space\,\sectiontitle}
{\chaptertitlename\space\thechapter. \chaptertitle}}{}{\thepage}
}
\pagestyle{main}
\usepackage{lipsum}
\begin{document}
\chapter{Foo}
\lipsum
\appendix
\chapter{Bar}
\lipsum
\end{document}