The easiest option is to make the entry dataonly
in the .bib
file by adding
options = {dataonly},
This will make the entry skip the bibliography (it sets skipbib
) and will make sure the entry does not interfere with extradate
and other label-related matters. (If you want label-related functions for this entry, use just options = {skipbib,skipbiblist},
).
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\begin{filecontents}{\jobname.bib}
@book{lennon1972,
author = {John Lennon},
title = {Who did what in the Beatles},
year = {1972},
options = {dataonly},
}
@book{starkey1994,
author = {Richard Starkey},
title = {I'm the drummer},
year = {1994},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\citeauthor{lennon1972} once wrote a book \citetitle{lennon1972}.
You can read about it in \textcite{starkey1994}.
\printbibliography
\end{document}

That may not be the ideal option though if you want to decide dynamically from within the document whether or not the entry should be printed. In that case you can use a category to filter the entry. The label data will have been created at that point, so you can't get rid of the entries influence on extradate
and other uniqueness-related features.
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\DeclareBibliographyCategory{skipbib}
\addtocategory{skipbib}{lennon1972}
\begin{filecontents}{\jobname.bib}
@book{lennon1972,
author = {John Lennon},
title = {Who did what in the Beatles},
year = {1972},
}
@book{starkey1994,
author = {Richard Starkey},
title = {I'm the drummer},
year = {1994},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\citeauthor{lennon1972} once wrote a book \citetitle{lennon1972}.
You can read about it in \textcite{starkey1994}.
\printbibliography[notcategory=skipbib]
\end{document}
It is possible, but not completely easy to automate this. In the following MWE all entries that were cited with a \cite...
command that does not turn off citetracker
are shown in the bibliography. Again it is too late at that point to discard uniqueness effects.
\documentclass{article}
\usepackage[style=authoryear, citetracker]{biblatex}
\DeclareBibliographyCategory{showinbib}
\AtEveryCitekey{%
\ifbool{citetracker}
{\addtocategory{showinbib}{\thefield{entrykey}}}
{}}
\begin{filecontents}{\jobname.bib}
@book{lennon1972,
author = {John Lennon},
title = {Who did what in the Beatles},
year = {1972},
}
@book{starkey1994,
author = {Richard Starkey},
title = {I'm the drummer},
year = {1994},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\citeauthor{lennon1972} once wrote a book \citetitle{lennon1972}.
You can read about it in \textcite{starkey1994}.
\printbibliography[category=showinbib]
\end{document}