Originally was my code in article class. In the footer it showed the name and number of the section (which was the chapter) in the way it was formatted e.g. bold etc....
However converting it over to book class, it no longer shows the name of the chapter, but instead the name of the section. here is the MWE:
\documentclass[12pt, oneside]{book}
\usepackage{sectsty,fancyhdr}
\usepackage{geometry}
\usepackage{lipsum}%remove
% ***************************Header/Footer Settings****************************
\sectionfont{\LARGE\bfseries}
\pagestyle{fancy}
\fancyhf{}
\rhead{}
\lhead{Project title}
\renewcommand{\headrulewidth}{2.0pt}
\renewcommand{\footrulewidth}{1.0pt}
\setlength{\headheight}{14.5pt}
\rfoot{Page \thepage}
\lfoot{\chaptername~\thechapter}
%\lfoot{\leftmark} % Should show the name and style of chapter
\makeatletter
\renewcommand{\sectionmark}[1]{%this avoids the \makecaptical of footers
\markboth{\ifnum \c@secnumdepth>\z@ %this allowes symbols in foorters
\thesection\hskip 1em\relax
\fi #1}{}}
\makeatother
% ***************************Chapter Style****************************
\usepackage{graphicx}
\usepackage{etoolbox}
\makeatletter
% no new page for \chapter
\patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
% don't change the pagestyle
\patchcmd{\chapter}{\thispagestyle{plain}}{}{}{%
\GenericWarning{(preamble)\@spaces\@spaces\@spaces\@spaces}{Package preamble Warning: patching \string\chapter\space did not work.}}
% allow floats on new chap page
\patchcmd{\chapter}{\global\@topnum\z@}{}{}{}
%style
\usepackage[T1]{fontenc}
\usepackage{titlesec,xcolor}
\definecolor{gray75}{gray}{0.65}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\vspace*{-2em}\Huge\bfseries}{\scalebox{1} {\thechapter}\hsp\textcolor{gray75}{|}\hsp}{0pt}{}
\titlespacing{\chapter}{0pt}{50pt}{30pt}
%------------------------------Begin--------------------------------
\begin{document}
\chapter{Example 1}
\section{Section 1}
\lipsum
\newpage
\chapter{Example 2}
\section{Section 2}
\lipsum
\end{document}
How to make it so that it shows "1 Example" with the grey vertical line in the footer.