• I have a site that I’ve created for a client, using WP as a CMS. All of the pages on the site, except one, are pages. There is an “Events” page that I’ve created for the blog. So the folks can post upcoming events easily.

    Anyway, all of the page/site titles are showing up correctly except for the “events” page (which is actually the blog). It just shows the site name. Is there a way to customize the title for that page only so it shows “Events | Site Name”? I’ve create a custom template for that page and have tried taking the WP tags out and specifying the title manually but that didn’t seem to work.

    Below is the link for the page in question:
    https://www.themaxxclubonline.com/events/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Are you talking about the ‘title’ in red, directly above the march 30 entry?

    Thread Starter popstalin

    (@popstalin)

    No, I’m talking about the title in the browser title area—top of the browser window.

    check your header for the <title> </title> tags.
    Is there an if statement in between those?

    If so, and you can’t figure it out, post the code back here.

    Thread Starter popstalin

    (@popstalin)

    This is the code for the events template:
    <title>Events | <?php bloginfo('name'); ?><?php } ?></title>

    This is the code for all other headers:

    <title>
    <?php if ( is_home() ) { ?>
    <?php bloginfo('name'); ?>
    <?php } else { ?>
    <?php wp_title(''); ?>
     |
    <?php bloginfo('name'); ?>
    <?php } ?>
    </title>

    Is the code for the events template in the header like the rest? Is there more code that you didn’t copy? I’m confused by the } following the events title.

    Thread Starter popstalin

    (@popstalin)

    I took that extra bit out and now it’s showing ” | The Maxx Club Online.” It seems to me it’s using the Main Index Template instead of the Events template. I also decided to use just this code:

    <title>
    <?php wp_title(''); ?>
     |
    <?php bloginfo('name'); ?>
    </title>

    So is it working now?

    Thread Starter popstalin

    (@popstalin)

    No, now I’m getting ” | The Maxx Club Online.” Still not getting the page title. I’m guessing what is happening is that it thinks it’s the homepage, since I’ve got it set-up to be the blog and not pulling the correct title.

    I need to figure out how to the PHP to call the actual page title instead of it being the “home page” if that makes sense.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Customize Page Titles’ is closed to new replies.