Creating tag clouds, which files to change and where to put the new lines of code?

Hello everyone,
I’m trying to add a tag cloud, consisting of all possible tags we have created thus far, to our public show page, which when clicked on should link to a display of items containing that particular tag. I have done some research on this matter around the forums and have found lines of code which I think might be what is needed to create that tag cloud:

$tags = $this->_helper->db->getTable(‘Tag’)->findBy(array(‘type’=>‘Item’));

<?php echo tag_cloud($tags, 'items/browse'); ?>

My current problem is that I am not sure where to put these lines of code, or really if this would even work, since I have experimented with it to no success. I believe the files I need to access are collections/show.php (we only use a single collection), is that correct? Mind you, I am a complete novice in php coding.

Our Omeka version is 2.7.1 and we are using the northfield-master theme. Any help on this matter is greatly appreciated. If further information is needed, just shoot me a question.