How can I create a Bible search engine via WordPress?

I have some translations of Bible in Turkish language. But, they are as of books. (Matthew, Mark, Luke, John… ) I uploaded them into a website which is being managed by a wordpress software.

http://www.incil.biz/incil-1
http://www.incil.biz/incil-2

Read More

I want to make a Bible search engine. But, these are very long texts.

How can I create a Bible search engine via WordPress?

Is there a way to split the books into verses?

Related posts

Leave a Reply

1 comment

  1. If I understand your question correctly, the problem is the target for the search results. Just finding the matching page is not good enough when the visitor has to scan a long document after entering the page.

    You could split the long texts into smaller pieces, in WordPress: posts.

    An idea:

    • Create a main page for each book.
    • Create a child page for each part of the book.
    • On the main page print the content of all child pages, so your readers can read the whole book at once. Pseudo-code, not tested:

      $sub_pages = get_pages( array ( 'parent' => get_the_ID() ) );
      foreach ( $sub_pages as $sub_page )
      {
          echo apply_filters( 'the_content', $sub_page->post_content );
      }
      
    • Add a book selector to your search field: for each main page offer the numeric ID as checkbox value and the title as label text. Then filter the search query to search in child pages of these parent IDs only.
    • In your search results, the visitor gets links to the small parts only, you just add a link to the main page to these sub-pages.

    An alternative approach:

    • Keep the texts together, and add a parameter highlight with the search phrase to the search result links, like this:

      <a href="/foo/?highlight=moon">Page title</a>
      
    • On the found page, inspect the $_GET['highlight'] and mark all matching words with a custom element:

      <mark>moon</mark>
      

      But that would still require a lot of scrolling.