Turn your Blogroll into a Google CSE
March 8, 2008 — techxplorerA WordPress plugin I’ve written with the co-operation of the kind folks at the Libraries Interact blog makes it possible to take links listed in your Blogroll, using the Links Manager, and create a Google Custom Search Engine (CSE) automatically.
Please note that while the plugin is released under the terms of the GPL, using the Google Custom Search Engine service means that Google assumes you agree to their terms of service.
Features of the plugin include:
- Grouping links into categories
- Distinguishing between links that are considered “live” and those that “abandoned”
- Control over the text displayed to the user for various user interface elements
- Managing the colour of elements in the CSE search results display
- Using the Farbtastic library to provide an easier way to select colours
- The URL for the XML Google CSE specification is changed whenever a link is added, edited or deleted, ensuring that the most up to date list of links is always used by the Google CSE
The plugin is currently in use by the Libraries Interact blog to power the list of blogs on the Aussie Library Blogs page.
The source code for the plugin is available under the terms of the GPL from the WordPress Plugins website.
New in Version 1.1
- Improved error handling for the options form
- Tweaked some areas of the code to support WordPress 2.5
Known Issues
- The Google CSE search box will not work if you’re not using permalinks
Installation Instructions
Installing the plugin takes a number of steps. They are:
- Creating your link categories
- Adding your links to the categories
- Uploading & Activating the plugin
- Configuring the plugin
Also on this page is a list of known issues.
For the plugin to work you’ll need at least one link category. This link category will contain those links that you want to be included in the Google CSE. You can associate the plugin with was many categories as you wish. As an example the Libraries Interact blog groups the list of Australian library blogs into “Personal Blogs” and “Corporate Blogs”.
The plugin can also work with two additional categories. These categories are designed to differentiate between “live” links and “abandoned links”. For example this means that the Google CSE can contain blogs that may still contain useful information and yet have been abandoned. The list of links can then be sorted to remove abandoned links if a user is only looking for blogs that have been updated recently.
Creating and managing link categories is undertaken using the Links Manager feature of WordPress.
Adding your links to the categories
Once the link categories have been created you need to add your links to those categories. You add links to the blogroll and the categories in the normal way using the Links Manager feature of WordPress. Ensure that:
- The links you want to include in the Google CSE are in the appropriate category
- If you’re differentiating between live and abandoned links ensure that the links are also in these categories
An example of the way the table of links in the Links Manager will look is outlined in the screen shot below.
(Clink the image for a larger version)
Uploading & Activating the plugin
- Download the plugin archive
- Unzip the files into a temporary location
- Upload the blogroll-google-cse directory into your wp-content/plugins directory
- Login to the administrative section of your WordPress blog
- Click the Plugins link on the main menu bar
- Click the Activate for the Blogroll to Google CSE plugin
- Click on the Options link on the main menu bar
- Click on the Blogroll Google CSE link on the secondary menu bar
- Select the link categories that should be included under the Link Category Options heading
- If there are “live links”
- Select the category containing the live links under the Live Link Category heading
- If there are “abandoned links”
- Select the category containing the abandoned links under the Abandoned Link Category heading
- Adjust the settings under the User Interface Elements heading
- Adjust the settings under the Google CSE Options heading
- Adjust the colours of elements of the search results using the colour wheel under the Google CSE Colours heading
- Change the Miscellaneous search results display options
- Enter the URL of the page that displays the list of links and the search box into the URL of the Search Page text field under the Search and Results Page URLs heading
- Enter the URL of the page that displays the search results into the URL of the Results page text field under the Search and Results Page URLs heading
- Click the Update Options button
- If you find that links are appearing in the blogroll section of your theme and you don’t want them to. You can either:
- Change the visible status to “no”
- Edit the theme, so the call to the “wp_list_bookmarks” template tag excludes the category (or categories) you’ve put your links into
If you have any questions, queries or comments about this plugin, please contact me by leaving a comment or emailing me at techxplorer@gmail.com.






March 8, 2008 at 5:05 pm
[...] Aussie Library Blogs page. The page is now built dynamically created using a WordPress plugin that I’ve created with the assistance of the other THALI members. This new way of managing the list of Aussie Library [...]
March 8, 2008 at 5:26 pm
[...] kind folks at the Libraries Interact website. You can read more about the plugin by visiting the Blogroll to Google CSE project page on my [...]
March 12, 2008 at 8:22 pm
[...] 2008 — techxplorer I posted the other day here, at the Libraries Interact blog, about the Blogroll to Google CSE plugin. I can now proudly say that the plugin code has been uploaded to the WordPress Plugins [...]
March 27, 2008 at 6:20 pm
[...] I uploaded a new version of the Blogroll to Google CSE plugin. You can read all about the plugin here on my website, or download it from the WordPress Plugins [...]
April 13, 2008 at 11:09 pm
[...] Blogroll to Google CSE 1.1 » techxplorer (url) A plugin to manage links in the blogroll that are searched using a Google CSE. [...]
April 21, 2008 at 10:36 am
[...] such as AJAX in my development work. I’ve also recently released my first WordPress plugin, WordPress Blogroll to Google CSE, and I’m working on another with the kind people at the Libraries Interact [...]
June 25, 2008 at 9:03 am
[...] Turn your Blogroll into a Google CSE « Tech Explorer [...]
June 25, 2008 at 9:17 am
[...] Turn your Blogroll into a Google CSE « Tech Explorer [...]