Make Your Own Holy Day of Obligation Reminder Widget

  • Sharebar

Tim Bartel from the fantastic Golden Arrow blog asked the following question on one of my WordPress plugin posts:

Do you know where i can find a widget for inserting a U.S. Holy Days of Obligation reminder on my blog?

Well Tim, I think I have just the thing for you.  Unfortunately, there wasn’t a specific plugin out there that had all of the holy days of obligations listed, but that doesn’t mean that we can’t jury rig a little sompin’ sompin’. 

Photo by Panoramas

a great cathedral in Milan

Okay, so the first thing that you will need to do is download the WP Web Scraper plugin.  The plugin comes with a widget feature that we will edit to make our plugin.  In essence, the scraper plugin will scrounge another site’s HTML source code for the information that we want. So really, we could use the plugin for just about anything.  Of course, I recommend that you give the credit to the site you are going to scrape from for the information that you are scraping, since they wrote it.

Alright, so after you have downloaded and installed the WP Web Scraper plugin, go to the widget menu under the appearances menu in WordPress and add a text box into your sidebar.

Once you’ve done that, title the text box however you like and add the following code into the text box:

<ul><li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(0)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li>

<li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(1)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li>

<li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(2)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li>

<li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(3)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li>

<li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(4)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li>

<li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(5)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li>

<li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(6)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li>

<li>[wpws url="http://www.catholicusf.org/holydaysofobligation/" selector="li:eq(7)" clear="" cache="9000" output="" agent="" timeout="1" error=""]</li></ul>

What this does is list all of the holy days of obligation for 2009 and 2010.  It will change as the site’s author’s change it, so you shouldn’t have to worry about it being updated as long as they update their site.  Because the plugin is scraping the content of the Catholic Student Center of USF make sure that you copy the code above exactly.  The reason is that the information above caches the information for long time so that your site doesn’t constantly have to look for updated content every time someone visits (that’s why the cache is set at 9000 minutes).  If it weren’t, your site and Catholic Student Center of USF would be bogged down by requests every time your site was accessed.

Anyway, hopefully this helps and you are able to use this as a means of reminding your readers about U.S. holy days of obligation.  Let me know if you need anything else. Maybe I’ll make a real plugin that does this if I get enough people asking for it.

Discussion 2 Comments

  1. fantastic help………..

  2. Glad it helped! Let me know if it works for you! =)

Add a Comment

* Copy this password:

* Type or paste password here:

18,464 Spam Comments Blocked so far by Spam Free Wordpress