Member
Member
wumpus   28-02-2010, 03:19
#1

I want to append "(Page 2)" to my html on each album when I am on page 2 or higher. This way Google isn't indexing duplicate page titles for my paginated albums. I'm using v1.26 currently.

I believe this involves an if statement using the function getAlbumPage() but I'm not really a coder so if someone could point me in the right direction I'd be grateful. Thanks!

Member
Member
gjr   28-02-2010, 04:48
#2

just guessing, for album.php, to get page number in when the album has more than one page....

`

`

or if you want page numbers always...

`

`

Member
Member
gjr   28-02-2010, 05:05
#3

looking at that, not sure if the function returns an integer or string, if that doesn't work you could try replaceing the if with...

`

Member
Member
wumpus   28-02-2010, 05:48
#4

Thanks for your help. After trying what you said, I finally realized that getAlbumPage only applies to the current image, not the current album (it kept returning 0).

I searched further and discovered there is a getCurrentPage() function(!).

So this is the code that worked (again, thanks to you for getting me here):

`

`

Member
Member
reneesanguinetti   18-06-2011, 13:18
#5

I also would like to add page numbers to the titles on page 2 or higher. Currently using zpfocus_v1.4. Where do I place this code?

Thank-you.

Administrator
Administrator
acrylian   18-06-2011, 16:25
#6

You should open a new thread as you question is theme specific. I really doubt that the theme's author will notice this otherwise...

Member
Member
Michel Gagnon   19-06-2011, 22:25
#7

It's indeed theme-specific. But as a general principle:
– Go in the /themes/Your_theme folder
– Look for files such as album.php, gallery.php, image.php
– Find "breadcrumb" style; this is very likely to be where you have the title of the page displayed

Member
Member
wdiggles   21-06-2011, 03:54
#8

@reneesanguinetti

If you mean the page title as seen in google search results you would put the code in between the tags of your album.php file. Just added it to my site and it works wonderfully.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.