Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS AJAX and WordPress: How to change Page title Re: AJAX and WordPress: How to change Page title

#106813
davemcmillan
Member

Hey Noah, I’m also using that AJAX theme and I came up with a way to change the page title. I started by putting this just after my “#main” div that is loaded for each page. You need to put this in all your template files that will be loaded –


Then in my JS in the footer within the .load function somewhere, I put this –


var pageTitle = jQuery("input.page-title").val();

if (!(jQuery.browser.msie)) {
jQuery('title').html(pageTitle);
}

It seems to break in IE so thats why I had the “if” statement in there.

In terms of SEO. I would recommend adding a Google Sitemap to the site. Google will at least then pick up all the different pages, and luckily with the way that Chris’s theme works, if you click on the page it will take you to the correct AJAX page with the hashlink etc.

Cheers,

Dave