Current Version: BibleGateway VOTD Plugin 2.2
This plugin inserts BibleGateway.com’s verse-of-the-day into pages or posts, or as a sidebar widget. It requires at least WordPress 2.5 as it uses WordPress’ shortcode API.
To use simply insert [bible-votd] in a page or post where you want the verse to appear, or use the Widget panel to drag and drop the Bible VOTD widget into your sidebar.
Using the Widget panel you can select the Bible version you want the widget to use. The version selected in the widget becomes the default version for the shortcode as well; however, you can override the shortcode version on a per use basis by using the “ver” option. For example, to use the KJV for a specific page or post write:
[bible-votd ver="9"]
Visit Bible Gateway’s web site for other translations that can be used.
Version History
2.2 (Jun. 24/09) – Updated attribute_escape to esc_attr to maintain current WordPress functions.
2.1 (Apr. 27/09) – Fixed a naming collision for the Title when using the sidebar widget.
2.0 (Feb. 20/09) – Added widget functionality. Verse of the day can now be included in sidebars of themes that are widget ready.
1.0 (Jun. 16/08) – Original release.
How would I use this as a widget in a sidebar?
At the moment the plugin isn’t coded to take advantage of the widget system in WordPress, so it won’t appear in the Widgets section. There are, however, a couple of easy workarounds.
Option 1 (which I think is the easiest):
Edit the sidebar.php file of your theme and add the following (inside the <?php ?> enclosures):
echo do_shortcode(‘[bible-votd]‘);
Inside the quotations is the shortcode, so you can also change Bible versions.
Option 2 (a little more complicated but more versatile):
In the bible-votd.php plugin, add the following code:
add_filter(‘widget_text’, ‘do_shortcode’);
At the end, after the line that reads:
add_shortcode(‘bible-votd’, array(&$dzvotd_pluginSeries, ‘BibleVOTD’));
Then you can use add a Text widget with the shortcode and it will substitute in the verse of the day.
Let me know if you need more detailed instructions.
The theme I have (WP hybrid news) doesn’t have a sidebar.php file so I chose your option #2. It wasn’t exactly as you said, but I added the code and this is what I have. Now on my website, it just has what I put in the text widget? What did I do wrong? Thank you, so much.
if ( isset($dzvotd_plugin) ) {
add_shortcode(‘bible-votd’, array(&$dzvotd_plugin, ‘BibleVOTD’)); add_filter(’widget_text’, ‘do_shortcode’);
add_action(‘plugins_loaded’, array(&$dzvotd_plugin, ‘BibleVOTD_widget_init’));
}
I just wrote to you needing help to get my “bible verse” working. I just wanted to say that I have it working now, so don’t bother to answer me. Its working wonderful and I want to thank you, so much, for having this available for everyone. God bless you, all
Hi Chris,
Glad you got everything working!
I’ve installed the plugin and added the widget to the sidebar and the verse and link are showing up but there’s a large hard to view speaker that’s 300 pixels tall throwing the widget section off?
Is there a way to remove the audio link and image or ???
This is likely caused by a conflict in CSS code somewhere. The widget encapsulates the BibleGateway verse in a class named biblevotd by default. You can use that to exception out conflicts. For example, to completely remove the image BibleGateway inserts to listen to the audio, you can add the following to your style.css file:
.biblevotd img { display: none; }You could also also have the speaker appear properly by manually setting the width and height like this:
.biblevotd img { width: 13px; height: 12px; }Is there a way to make the links from the BibleGateway VOTD Plugin open in a new page rather than in the same page? I tried adding in target=”_blank” in what I thought were the sections creating the links in the plugin, but this just caused the plug in to fail.
The plugin simply inserts the JavaScript code provided by BibleGateway. When the browser reaches that code, it loads the JavaScript from BibleGateway’s web site. That code contains the bible verse and links. As it is now, there’s nothing in the plugin that could be modified to alter the content from BibleGateway’s web site.
One possible solution would be to load the verse from BibleGateway in the back-end, using PHP to open the remote URL. However, if BibleGateway is down or running slow, this will cause significant page load issues or time outs.
The best possible solution I can think of would be to use another JavaScript function that intercepts link clicks and forces them to open in a new window. JQuery could probably do it and there may even be plugins that exist already for WordPress that will take care of it for you. This particular feature is not something I plan to incorporate into the plugin so an alternate solution would be your best bet if you absolutely need the links to open in a new window.