Tip: Remove blog name from search-engine results
The search-engine v0.5.7.1 plugin of course displays the title of each blog entry along with a summary of the content. If the index only contains one blog, it’s redundant and annoying to see the blog name in every title. For example:
My trip by TravlerBlog
Fun in a new town by TravlerBlog
Packing tips by TravlerBlog
To eliminate the ” by TravlerBlog” text (made up name for this example), I replaced line 1235 of search-engine.php with the following (line split for readability but this is all one line):
<h3 class="search_engine_Title"> <a href="<?php echo $result->url; ?>"> <?php echo $search->search_do_excerpt( str_replace(' by TravlerBlog', '',$result->title) ,68,false); ?> </a> </h3>
The ‘str_replace()’ part replaces the original full $result->title.
If there is a better way to do this, please post here. Thanks!
- The topic ‘Tip: Remove blog name from search-engine results’ is closed to new replies.