This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/
9 January, 2013
This tutorial will put your Sermon series image on the top of every Sermon associated with the Series.
Creating the [series_id] tag --->
head to /wp-content/plugins/sermon-browser/sb-includes/dictionary.php
or if in wordpress admin navigate to
Plugins>editor choose Sermon Browser
scroll to the bottom
paste this code before the closing brackets.
It should look like this.
'[series_id]' => ' series); echo str_replace(" ", "-", $temp_series_id); ?>',
Calling up the right Image--->
On the left navigation bar you should see the Sermons tab.
Open it and click on "Templates"
In the "Sermon Page" window
just below the first line enter this code
it should look like this
(you can change the "series-banner" class to whatever you want but I'll be using that for styling later.)
Naming your Images -->
There are two things you will need to do to make sure that you actually get an image.
First: Use your series title to name your images when you upload them into wordpress.
for example: If the series is titled Life of Jesus. name your image "Life of Jesus.jpg"
DO NOT add anything to the end. "Life of Jesus banner.jpg" will get you nothing.
Second: Wordpress does two things to the file names when you upload them.
First it replaces all empty space with hyphens. So "Life of Jesus.jpg" becomes "Life-of-Jesus.jpg"
Don't worry about it that's taken care of. Just be sure to use "space" or "hyphens" to separate words in your file names. underscores won't work. (it needs to be the same as the series title.)
Second it automatically places all of the files into folders by month and year... we need to turn this off or our code won't find the image.
In the wordpress admin screen, open up
Right above the "Save Changes" button you will see the option to organize by month and year.
Make sure this is UNCHECKED.
And BOOM! your series images show at the top of the sermon page.
Big Thanks to Ben for helping me figure this out, and trouble shooting that php code.
19 November, 2009
Very nice! Thanks for sharing this!
Matt Schlueter, Multimedia Coordinator
Dodgeville United Methodist Church -- Dodgeville, WI
5 February, 2013
18 June, 2009
9 January, 2013
I am having the same problem as krunnels. I don't get any image come up at all. I followed the exact instructions in Jared's first post. I think I need to do something with "series-banner" maybe? (I'm pretty newb at this).
15 July, 2013
Thanks for this tutorial! I was able to add a series image for the individual page for each sermon.
Is there a way to extend this functionality so that it works for the search pages as well? I tried adding the [series_id] php code to the part of /wp-content/plugins/sermon-browser/sb-includes/dictionary.php that works for sb_search_results_dictionary instead of just sb_sermon_page_dictionary, but when I try to add these lines inside of [sermon_loop]
<td class = "series_banner"> <img src = "http://livingwaterberkeley.org/wp-content/uploads/[series_id].jpg"/> </td></tr>
the sermons disappear on the actual page.
Any help or suggestions would be appreciated! Thanks!
18 June, 2009
I haven't looked at your site yet, but here are some thoughts to get you started. In dictionary.php, there are two functions. The first, sb_search_results_dictionary, defines template tags that can be used in the search results template. The second, sb_sermon_page_dictionary, defines the template tags for the sermon page template. Jared's tutorial only shows the code for the [series_id] tag in the sermon page template, so if you didn't add any code into the sb_search_results_dictionary function, you won't be able to use the template tag in the search results template.
You can add the template tag to the sb_search_results_dictionary function. The code will need to be slightly different to work in that function. Try adding this code to the end of the sb_search_results_dictionary function:
After you've added that code into dictionary.php, go to your Sermons, Templates admin page and hit the Save button to load in the new template tag definitions. Then you should be able to use [series_id] in the search results template.
Note: I haven't tried out the code yet, so let us know if it works for you.
Let us know if you have any questions.
15 July, 2013
Ben and Jared -
It works! Thank you so much!
The sermon site is http://www.livingwaterberkeley.....ia/sermons if you'd like to see how it looks. After I added in the dictionary php code, I added html code to call up the image right after it says [sermons_loop] in the template for search result page.
For future reference, what made this php definition from the previous one? Is it because the search result page uses a different variable for $sermon than the regular sermon page?
18 June, 2009
The search results template tags are used in a different part of the software than the sermon page template tags. (See sermon.php, function sb_shortcode to see this. The "eval" statement with 'single_output' in it is the sermon page template, and the "eval" statement with 'search_output' is the search results template.)
As a result, the $sermon variable is defined differently in the two contexts. In the search results template, $sermon contains an object with the current sermon data. ($sermon actually gets defined in the [sermons_loop] template tag.) In the sermon page template, this same sermon object is contained in $sermon["Sermon"].