I tried using the phplugins “function pallet_top_title” to insert the meta “title” for a photo in an <H1> tag for a single image page. I would like it to appear just above the menu. I have disabled the masthead image. This was the code I was using in custom-phplugins-pangolin.php:
function pallet_top_title() {
// Below, the default markup for the title. The LI wrapping element is mandatory;
// replace the inner HTML as you see fit. Retain the "masthead_pallet_top" class and styling,
// or assign a new class, with styling defined in custom CSS.
// Take note, the top pallet height is a 48px fixed value.
echo '
<li class="masthead_pallet_top">
<h1>$photo->getMetadata(Photo::$PHOTO_TITLE)</h1>
</li>
';
return false;
}
function pallet_top_title() {
// Below, the default markup for the title. The LI wrapping element is mandatory;
// replace the inner HTML as you see fit. Retain the "masthead_pallet_top" class and styling,
// or assign a new class, with styling defined in custom CSS.
// Take note, the top pallet height is a 48px fixed value.
echo '
<li class="masthead_pallet_top">
<h1>'.$photo->getMetadata(Photo::$PHOTO_TITLE).'</h1>
</li>
';
return false;
}
For everyone else following this, my example code finished with ... indicating that there’s more to put there. One thing is return true; in order to preserve the default single page image display!