The simpler media website CMS
Hi everyone just want to ask is there any way to edit title of the photos or album pages.
for example ;
in this page:
https://www.fdream.co.uk/index.php?album=Cream&image=fluffy-103.jpg
title: Handmade Cream Blanket | Cream blankets | Fluffy Dreams
in this page title can i edit like how i want be couse i want to take of ( cream blankets ) from middle be couse its to long and not make sanse.
Thanks very much
Comments
I see you're using the zp-base theme. Try this: in the theme folder find inc/header.php. Now look for
printHeadTitle();
(line 101)and change this to
printHeadTitle(' | ', false, false);
.Further reading:
https://www.zenphoto.org/news/theming-tutorial/
and
https://docs.zenphoto.org/1.5.x/function-printHeadTitle.html
Thanks for answer
Do we have a chance to add separate titles to the album and photo pages one by one?
Not without editing/modifying the theme. THere are separate functions available. Please review the links fretzl posted for the basics of themining
Dear @acrylian and @fretzl thanks very much for response me again.
I have been reading many times try understand to many times but I do not understand how to modifiying the theme. Im not a programmer but i do my website i can open and change the codes in php thats not a problem but still not understand how is it going to be.
i have change printHeadTitle(); (line 101)
and change this to printHeadTitle(' | ', false, false)
on header.php
but noting happened. what i have to do more can you please explain to me with little bid more details thanks very much sory for take your times.
That actually would work. Are you sure you edited the right file and actually the one on your site?
Also looking at the source code quickly you should check your modifications as I see invalid code (which is not form the zbase theme itself):
Beside
<center>
is a html element that is deprecated it is invalid within the header as is the<img>' and
` element.About the title:
You are correct. It doesn't work like it should. Sorry for that.
We are looking into it.
In the meantime try this:
In inc/header.php (line 101) replace
<?php printHeadTitle(); ?>
with
Dear @acrylian and @fretzl thanks very much for your help again.
Dear @fretzl i edit the printheadtitle code like how u say;
if ((class_exists('RSS')) && ($rss_option != null)) printRSSHeaderLink($rss_option,$rss_title); ?>
<?php switch ($_zp_gallery_page) { case 'album.php': echo getBareAlbumTitle(); echo ' | '; break; case 'image.php': echo getBareImageTitle() . ' | '; break; } echo getMainSiteName(); ?>
for example in this photo page old title was:
title: Handmade Cream Blanket | Cream blankets | Fluffy Dreams
new title; Handmade Cream Blanket |
its actualy work but its deleted main title aswell Fluffy Dreams,
plus after couple of times open chrome give error message ( http 500 error ) but in phone and internet explorer still was opening thats why i have to change it back maybe i put the code somehere wrong ?
is there any way we can only put it there like;
title: Handmade Cream Blanket | Fluffy Dreams
from photo pages takes out middle title and keep only main one plus this page name like this.
Like only; ( ImageTitle | MainSiteName )
for image pages.
Thanks for your time
I guess the Gallery title() is needed here instead of the getMainSiteName().
Try this instead:
That is what this code does.
To explained the difference:
Thanks Very much for all information last code work perfect.