Webmaster Forum

Go Back   Webmaster Forum > Marketing Forums > Google Forum

Google Forum Discuss Google related issues.


Reply
 
LinkBack Thread Tools Display Modes
Old 07-15-2009, 08:45 PM   #1 (permalink)
Member
 
Join Date: 06-13-09
Location: pcwilleasy.co.cc
Posts: 49
iTrader: 0 / 0%
Latest Blog:
None

pcwilleasy is liked by many
Exclamation Use Google Search API to find related post in each post

You can use Google Search API to find related post of your site base on title in wordpress. You can check it in my website:

http://pcwilleasy.co.cc/
or
http://pcwilleasy.co.cc/technology-t...-in-each-post/

It have function like


Quote:
AskApache Google 404 is a sweet and simple plugin that takes over the handling of any HTTP Errors that your blog has from time to time. The most common type of error is when a page cannot be found, due to a bad link, mistyped URL, etc.. So this plugin uses some AJAX code, Google Search API'S, and a few tricks to display a very helpful and Search-Engine Optimized Error Page. The default displays Google Search Results for images, news, blogs, videos, web, custom search engine, and your own site. It also searches for part of the requested filename that was not found, but it attaches your domain to the search for SEO and greater results.
http://www.askapache.com/seo/404-goo...ss-plugin.html

but my code have display not videos, image only some result of your website.


Every can me a idea that is good or not.

Here is the code:
Code:
<p>Related post</p> <head> <script src="http://www.google.com/jsapi" type="text/javascript"> </script> <script language="Javascript" type="text/javascript"> google.load("search", "1"); function OnLoad() { var searchControl = new google.search.SearchControl(); searchControl.setResultSetSize(google.search.Search.SMALL_RESULTSET); var webSearch = new google.search.WebSearch(); webSearch.setSiteRestriction('pcwilleasy.co.cc'); options = new google.search.SearcherOptions(); options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN); searchControl.addSearcher(webSearch, options); searchControl.draw(document.getElementById("searchcontrol")); document.getElementById('searchcontrol').firstChild.style.width='100%'; searchControl.execute("<?php the_title(); ?>"); } google.setOnLoadCallback(OnLoad); </script> </head> <body> <div id="searchcontrol">Loading...</div> </body> </html>
change the webSearch.setSiteRestriction('pcwilleasy.co.cc');
with your website.

Last edited by pcwilleasy; 07-15-2009 at 09:05 PM..
pcwilleasy is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-16-2009, 09:43 PM   #2 (permalink)
Contributing Member
 
Join Date: 11-27-08
Posts: 427
iTrader: 0 / 0%
webron is a jewel in the roughwebron is a jewel in the roughwebron is a jewel in the roughwebron is a jewel in the roughwebron is a jewel in the roughwebron is a jewel in the rough
Nice clean code, pretty easy to implement.
__________________
webron is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-17-2009, 12:36 PM   #3 (permalink)
Contributing Member
 
Join Date: 07-12-09
Posts: 86
iTrader: 0 / 0%
Latest Blog:
None

iPlanet is liked by many
Thanks for the code, thanks to pcwilleasy.
iPlanet is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Marketing Forums > Google Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find which page in google search foshan2 Google Forum 7 08-07-2007 07:03 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 01:09 PM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.