Hm.. from that linked post, this part will be relevant:
The SHIELD part will be 'virtual' in the BOM, as it appears in eeschema (with pins&nets) and in pcbnew (with pads&tracks), but not in the BOM as it misses a part number.
Would that work for your case?
If not you could only add another field to the symbols in the (your custom) library for being virtual.
And once the BOM is exported you'd be ignoring parts that are 'virtual'.
A script to add/modify fields for all symbols in all libraries in a folder is located here:
I only wrote this script to get the 'manf#' field added to my local libraries as I want to use KiCost.. but it's no big deal to also/instead get a field called 'virtual' added to the symbols.
Just export the csv file, add the columns you want to it and import it into the libs.