I had a similar approach once but decided to block non-router/pihole DNS traffic completely. So far all devices (google) fell back to the DHCP announced DNS servers. You'r approach should work too, but I think in such cases they will appear in your pihole as if coming from your router (including the MAC?) and EDNS(0) will not work with redirected traffic.
Ok, thx.
Do you think adding a second server IP would work? (I have 2 Pihole's)
So, you've set all you vlans to default dhcp dns, and changed the ones from your WAN to the Pi-Hole?
I've got it all working after a factory reset of my Ubiquiti switch.
The solution provided by @deHakkelaar as response to my original post seems to be working perfect.
Except that the vlans need to be set in a vlans in file dnsmasq.d folder instead of directly into the dnsmasq.d file. Also there's no need the install the vlan package or 802.1q mod.