PDA

View Full Version : How to index only part of page <title>?


visioneer
08-22-2004, 05:58 PM
How can I only index part of the page titles. I have the same beginning text one all pages. I don't want to index that part of the title. Can I exclude a string from indexing so that it won't index that part of the page titles. Perhaps I should use a meta tag for the page title. Also in connection with this, when I previously tried using the <!-- php Exclude --> tag to exclude the <title> from indexing it resulted in search results with no title text at all. So if I were to exclude the <title> when indexing how to I make the results show a page title?

This is the site I'm working with:
http://www.clba.org

Charter
08-24-2004, 08:03 PM
Hi. Search for $title = trim($regs[1]); in robot_functions.php and then substr (http://www.php.net/manual/en/function.substr.php) or str_replace (http://www.php.net/manual/en/function.str-replace.php) it.

visioneer
08-24-2004, 09:43 PM
Thanks but that only really removed the title text that is stored after a page has been indexed. The full title is already indexed prior to that function.

Charter
08-24-2004, 10:00 PM
Did you try a reindex? If you don't want to reindex, you'll need to edit the first_words column of the spider table to remove a portion of the title.

visioneer
08-24-2004, 10:24 PM
Yes, that was after the reindex. What seemed to work was placing the following:

//replace site-wide title text
$text = str_replace("Church of the Lutheran Brethren : ","",$text);
//replace common site-wide text
$text = str_replace("Church of the Lutheran Brethren","",$text);