Hi all -
With significant help from a coworker I've reached a point where I have a partially functional dynamic titling display. I'm uncertain where to take it next. While this is mostly attributable to my lack of PHP, I'm also not quite sure which functions need to be called. Any suggestions, thoughts, and especially corrections would be most welcome!
Thanks,
Bridger
With the following code, I have dynamic titles at the show collection level ( i.e., when my URL looks something like: localhost/collections/show/1 ) but I lose titles on all other pages ( e.g. localhost, localhost/items/show/128, localhost/collections, localhost/items/advanced-search, etc ).
add_filter('display_setting_site_title', 'collection_filter_site_title');
function collection_filter_site_title()
{
$collectionName = "Instance One";
if (!$collectionObj) {
$collectionObj = get_current_collection();
$collectionName = collection ('name', array(), $collectionObj);
}
elseif (item_belongs_to_collection()) {
$collectionObj = get_collection_for_item();
$collectionName = collection ('name', array(), $collectionObj);
}
return $collectionName;