Just to clarify food and fuel are part of the base headline CPI. There is another measure of CPI called Core CPI that excludes those items. The main reason is food and fuel/energy tend to be volatile causing the base CPI to jump all over the place.
Your clarification is correct. However, Core CPI is what’s used to calculate COLAs, if I am not mistaken. That screws pensioners.