PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   How to index only part of page <title>? (http://www.phpdig.net/forum/showthread.php?t=1203)

visioneer 08-22-2004 05:58 PM

How to index only part of page <title>?
 
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 or str_replace it.

visioneer 08-24-2004 09:43 PM

Not Quite It...
 
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:

Code:

//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);



All times are GMT -8. The time now is 09:45 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.