Bible Verse Plugin

22nd May

Ben and I this afternoon/evening worked on a Wordpress Plugin for displaying favourite Bible verses. You can see it at work in the sidebar –>

It used to be plain text but now gets the verse and reference from a database and displays them, either specifically or randomly.

Download

Get this cool new plugin bibleverse.zip

Installation

  1. Upload bibleverse.php into your wp-content/plugins/ folder.
  2. Navigate to the Plugins menu within your Wordpress admin area and activate the plugin.
  3. Click “Manage” and then “Bible Verses” and add your favourite verses and the references.

Usage

The tag to display the Bible verse is <?php fbv_get_verse( "random" , "verse" ); ?>.

The first parameter can take the values random, actual verse reference or verse id as shown in database. If random is used, the plugin will display a random verse from the database. If an actual verse reference is used (for example, John 3:16) the plugin will display the specified verse, if the reference is found in the database. If an id is used (for example, 1), then the verse with that ID (if any) will be displayed.

The second parameter determines what part of the verse is displayed. By default it is set to verse, and will display the actual verse text, but not the reference. If it is set to *reference* it will display just the reference.

If random is used for the first parameter, the second time the function is called (for example, displaying the verse and then the reference), a random verse will NOT be displayed. Instead, it will display the relevant reference/verse determined by the random verse/reference displayed before.

If you come here from Wordpress and use the plugin say Hi! It’ll be nice to hear from you.

God bless,

Dan

38 Responses to “Bible Verse Plugin”

Ineke
22nd May 2007
11:19 pm

consider it nicked :P

Dan
23rd May 2007
2:15 am

Good good, hope you like it and find it useful.

James Forsyth
25th May 2007
9:42 pm

Bro,

Would it be possible for you to post any suggested recommended change to the code to enable the text to be justified on the right as well as the left?

Thanks,

James

Dan
25th May 2007
9:47 pm

Hi James,

What I would do is wrap it in a P tag with a class or ID and format it with CSS. If you want any help on that let me know and I hope that helps,

Dan

James Forsyth
29th May 2007
9:38 am

Sorry bro, I’m a real noob at web code.

But I don’t want to inconvenience you.

Blessings,

James

candy
9th June 2007
10:32 pm

great plugin…how can i get it to display in sidebar though? I tried pasting the tag you provided in readme but it’s not showing up in my sidebar and I don’t want it to be on a page but rather on the sidebar. thanks!

candy
9th June 2007
11:03 pm

ok, nevermind..got it in my sidebar but can’t figure out now how to get the script to display the verse AND the reference together like yours does here in on your sidebar. what should the script read for this output? Thanks.

coNg
12th June 2007
8:07 pm

Hi,

i encountered the following prompt when i try to install..

WordPress database error: [Table 'mrcong_ahcong.wp_fbv' doesn't exist]
INSERT INTO wp_fbv VALUES ( ‘NULL’, ‘But seek first the kingdom of God and His righteousness, and all these things shall be added to you.’, ‘random’ )

Can you help? Thanks a million

Tyler
12th July 2007
9:56 pm

How do I get the verse and the reference to show on the sidebar? I can only get one or the other.

-Tyler

Brian
18th July 2007
9:39 pm

Neat! But which version of the Bible are you using?

Thanks.

jared
14th August 2007
4:33 am

Thanks for this cool plugin. Works great!

renji
20th September 2007
9:14 pm

nice plugin

Marcus
3rd January 2008
6:30 pm

I really, REALLY want to use your plug-in on a site (WP v2.3.2) that I’m working on for my pastor. For some reason, I can’t get any verses to save. Seems like it’s not INSERTing into the table. Any help would be most appreciated!

Mark
21st May 2008
11:37 pm

Great plugin!

Maybe I’m missing it, but how do i get the verse AND reference to display (similar to what you have posted on your blog)? I’ve tried to modify both the first and second parameters, but no luck. I’ve also tried adding a second “tag” to call the reference, but still no luck.

Thanks!

Dan
26th May 2008
10:05 am

Hi Mark, you should just need to put two php lines like this:

Hope that helps,

Dan

Katharina
20th June 2008
3:45 pm

Great plugin, wonderful idea! Unfortunately it doesn’t seem to work with Wordpress 2.5.1 … I can’t add any verses and references.

bob
14th July 2008
9:37 am

Dan, your last commment contained no code:

“Hi Mark, you should just need to put two php lines like this:

Hope that helps,”

Adrian G. Radu
25th September 2008
12:42 pm

I have Wordpress 2.6.2 and the plugin don’t work.
In “Manage/Bible Verses”’s form, after writing, the “Add Verse” button has no action…

Anybody can help me please?

Bible Study Verses
1st November 2008
9:51 pm

Excellent post.Maintain the oustanding work,You must definitely have to keep updating your site

Boris
6th November 2008
3:12 am

Oooo! This is a point mentioned. I like when everything in place while it is understandable to mere mortals.

SAP Lobby » 50+ Wordpress随机插件 zz
25th December 2008
3:28 pm

[...] Favourite Bible Verses: 随机显示经典摘录. [...]

Bible Online
2nd January 2009
3:09 pm

Nice post, and good bit of code…i will try it out. Thanks!

[...] Favourite Bible Verses: 随机显示经典摘录. [...]

Tjaart
16th April 2009
8:27 am

For some reason I am not able to add verses. Can you please assist?

romonoeroetoko
8th July 2009
5:19 pm

Hm that sounds good but I would like to know more details.

romonoeroetoko
15th July 2009
6:49 pm

Your news is a cool stuff man, keep it going.

amenodimeno
31st July 2009
6:55 pm

That’s good man, keep it going.

queroeropoo
7th August 2009
12:20 am

Good information to me.

adamoerikom
19th September 2009
10:28 pm

Stunning blog and good article. High 5 for u man !

George
28th September 2009
11:28 pm

Tyler and others..

Verse and Ref. code

Where are the verses stored? I think a permissions issue won’t let me add verses as others are having issues with. Anyone solve this problem?? Thanks!

George
28th September 2009
11:29 pm

Sorry. Code from above was removed from comments. Let’s try this…

////

George
28th September 2009
11:31 pm

OK. The code is the same as the above post. Sorry. Comment filtering in effect.

[...] Favourite Bible Verses: 随机显示经典摘录. [...]

Zucye
29th October 2009
4:57 am

It is not working. Verses don’t seem to save to database :(

marco
17th December 2009
6:12 pm

Me too, same prob. the verses are not saved. Can anybody help?

adamusxyz
6th January 2010
8:36 pm

This is a very good stuff man. But you can be more specific next time. See ya !

Giovanni
27th April 2010
2:00 pm

I had to create the MySQL table manually, looking in the code for the right query. But still I am not able to edit or delete verses. Anyway, great idea!

[...] Favourite Bible Verses : Add your favourite verses from the Bible to be displayed where you like on your blog. [...]

Leave a Reply




And he said to man, 'The fear of the Lord—that is wisdom, and to shun evil is understanding.'
Job 28:28

Twitter Updates