Here we describe and reflect upon teaching primary care theory within a fourth-year longitudinal module in general practice at Brighton and Sussex Medical School (2012 to 2021). Primary care theory teaching adopts a ‘hearts and minds’ approach towards promoting general practice. It appeals to students’ ‘hearts’ by highlighting the social justice function of general practice: tackling health inequalities by ensuring patients are treated in the right place, reducing cost and widening access to healthcare. These benefits also point to the place of general practice in promoting environmentally sustainable healthcare. By presenting evidence for the role of general practice in tackling health inequalities, we believe that our teaching also appeals to students' ‘minds’. Both approaches are important in order to counter the ‘hidden curriculum’ in undergraduate medicine which conveys negative messages about general practice.