No index tags and author pages

My tags and author pages are indexed on google, but google forum says to noindex them. I am using casper theme, can anyone help me where to put in the theme. Also i have read somewhere that if your noindex item is still in sitemap, google search console shows it as an error.Is is true?

Here is a guide for robots.txt configuration:

Thanks for reply but in this guide it doesnt tell where to put noindex code in casper theme. I want to no index my tags and author page.