I hope all of you are doing well. I am using a Harvard style reference system; in my work, I am trying to display only the last names in citations, but currently, the citations include first names or initials (as in "(I. Alamen, Radkov, and Al-Hadhrami, 2019)"). I want it to display just "(Alamen, Radkov, and Al-Hadhrami, 2019)", please.
I am using the following code
\usepackage[style=authoryear, backend=biber, natbib=true]{biblatex}
\addbibresource{references.bib}
\DeclareNameFormat{family}{%
\usebibmacro{name:family}
{\namepartfamily}
{\namepartgiveni}
{\namepartprefix}
{\namepartsuffix}%
\usebibmacro{name:andothers}}
\DeclareNameAlias{sortname}{family}
\DeclareNameAlias{default}{family}
\DeclareFieldFormat[article]{title}{#1} % Title in regular font
\DeclareFieldFormat[article]{journaltitle}{\mkbibemph{#1}} % Journal name in italics
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}} % Volume in bold
Please I need your help to solve this issue as soon as possible please. Thank you for your understanding
uniquename
feature: tex.stackexchange.com/q/134535/35864