if i put the code in my theme’s function.php file can it work?

Short Answer YES!! why because all a functions files does is act as a big huge plugin. Keep in mind though if you plan on using this with other themes or if in network mode you need the plugin file

techhipbettruvabetnorabahisbahis forumutaraftarium24eduedueduedueduedueduedusedusedu