I'm just getting into the omeka code, so sorry if this is an obvious question. I'm trying to tweak the item metadata display, so I copied application/views/scripts/functions.php to my theme directory and made some changes to custom_show_item_metadata(). But this seems to have no effect.

When I temporarily made the same changes to the original (in the application directory), they work just fine, but undoing those changes and adding them instead to the theme's copy of functions.php doesn't do anything. What are the general rules for overriding base application scripts with new files in the theme directory?

functions.php is a bit of an odd duck.

The real important file is custom.php. If you look at the application directory's custom.php, you'll see it's including functions.php. So, you'll be best off putting your custom code in custom.php directly.

The other thing is that the custom.php files don't quite work like the other theme files. All the custom.php files get loaded, the one in your theme doesn't override the core one, and you can't have more than one function with one name.

So, what you'll want to do is: make your changes to custom_show_item_metadata, put just that function in your theme's custom.php, and then change the function's name to something like yourtheme_show_item_metadata. Then, change the call in items/show.php to use the new yourtheme function.

Yes, that works just right. Thanks for the guidance.