Find command matching 2 directories



I cant figure out this :-(

I need to list all subdirectories of 2 folders which name match wp-content and wp-includes

i tried this:
find /home/username/public_html/ -path "*/wp-content/*" -o -path "*/wp-includes/*" -type d
find /home/username/public_html/ -type d -path "*wp-content*" -o -path "*wp-includes*"

but it lists files, not directories :-(

i think this worked :-(

find /home/username/public_html -iname "*wp-content*" -o -iname "*wp-includes*" -type d -exec find {} -type d \;

if anyone please can explain where was the bug or how to do more simply, would be welcome, thx

PS: what if i want to execute an chmod for each of these found subdirectories?
Last edited: