The Arduino forum shows a volume control, not a filter. Your amplifier already has a volume control.
Instead you need a lowpass filter. Use a series 4.7k resistor from the WT588D PWM output feeding the input to the amplifier's volume control AND feeding a 22nF filtering capacitor to ground. Turn down the volume control and slowly turn it up then tell us how it sounds. It will probably sound without distortion but very muffled then try smaller capacitor values.
Audioguru Again and dendad:
Thanks so much for the clarification and drawing. Visuals are something I can understand, so that drawing is great!
Just a few questions:
1. Does the pot indicated here correlate to the one on my amp package?

2. For this to work do I have to tie together the grounds of the WTD588 sound board and the TDA 7297 amp? Or does the .022µF capacitor go to just one of the grounds (and which would that be)?
As I wrote above the sound board is powered by 3V, the amp by 12V.
Apologies if these are stupid questions.
Best.
Shawn