- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Post title pretty much sums it up. I’m using Chris’ All AJAX theme for wordpress, and I noticed the title doesn’t change and was wondering what’s the best way to change it as well.
Also, due to the nature of AJAX and SEO, can anyone recommend any articles that relate to both subjects that covers best SEO practices for AJAX websites?
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
K so if you use –
document.title = pageTitle
instead of –
if (!(jQuery.browser.msie)) {
jQuery('title').html(pageTitle);
}
it works in IE too.
Cheers!
Hi
I’m new to jquery… please can you give me the full jquery code that will go between the script tags for this to work?