Good day, I finally got it working. I used '$OUTPUT' instead of '$theme' then it was working fine. I don't know why '$theme' is not working for me but I got what I wanted so I think I'll stick to it for now. Thank you for the help and have a good day Moodle community.
Themes
Default Images for Themes
This discussion has been locked so you can no longer reply to it.