1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to get page number included in the title tag on home page?

Discussion in 'WordPress' started by Jeffr2014, Oct 17, 2014.

  1. #1
    I have a few wordpress blogs and noticed that for all the themes that I'm using wp_title returns the same value for a home page with most recent posts and for older pages (e.g. page 2, 3, etc.). I assume they use is_home() or is_front_page() - both return TRUE when you go to "older entries" in posts index. As a result of this, I have the same title tag on the home page and on the pages displaying the list of older posts. With over 1000 posts in a blog I end-up with 10+ pages having the same title tag, which is really bad for Google indexing...

    Yet, when I look at some other blogs (not mine) I see that page number is properly displayed in the title. For example:

    http://cutepuppylove.me/page/3/ has title tag:
    "Cute Puppy Love | All the Cute Stuff You Love to See Everyday! | Page 3"

    while http://cutepuppylove.me/ has title tag:
    "Cute Puppy Love | All the Cute Stuff You Love to See Everyday!"

    Do you have any suggestions on how can I to get this "Page #" added to the title?

    I was hoping that using is_front_page will help and changed title section in header.php to:

    is_front_page() ? bloginfo('name') : wp_title('');

    but it didn't help...
     
    Jeffr2014, Oct 17, 2014 IP
  2. jslirola

    jslirola Active Member

    Messages:
    39
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    58
    #2
    https://wordpress.org/support/topic/put-page-number-in-title-tag
     
    jslirola, Oct 18, 2014 IP
    Jeffr2014 likes this.
  3. Jeffr2014

    Jeffr2014 Active Member

    Messages:
    254
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Thanks a lot! It worked perfectly!
     
    Jeffr2014, Oct 18, 2014 IP