This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/
5:32 pm
30 January, 2014
Hi,
First, I'd like to congratulate you on such a well-written, robust plugin. Great job!
I'm having an issue with the Recent Sermons widget on my home page. The audio links take you to the wrong page, although the sermon IDs in the URL are themselves correct..
I've looked through your forum, and I think the issue may have something to do with my page and menu organization. I've divided the sermon pages into two, one for each series. The widget link takes you to the wrong series page.
I do have the widget set to correct series for display. The correct file is also played within the widget's mini-flash player.
I looked through frontend.php to see if I could amend the code but wasn't sure where to make the change. I'd be willing to hardcode the URL and just make a note to myself to amend the code with each plugin update.
Anyway, the site is at http://aim2.openairwebdesign.com
The series pages are under the menu item "Teachings," with the first series under http://aim2.openairwebdesign.c.....editations and the second series under
http://aim2.openairwebdesign.c.....dio-dharma.
The widget is taking you to the "guided-meditations" page, but it needs to go to the "audio-dharma" page.
Thanks in advance for your help!
7:43 pm
Moderators
18 June, 2009
SuzanneM,
Sermon Browser works best when there is a single WordPress page containing simply a "sermons" shortcode (without any other parameters). This page will contain all sermons. You can optionally have other pages with "sermons series=?" shortcodes (although this is not necessary for what you are trying to do). For the widget, Sermon Browser tries to find this main Sermons page containing all sermons, and uses that for the links. If it doesn't exist, it picks one of the pages that you do have, in this case, your Guided Meditations page.
Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12
9:21 pm
30 January, 2014
Thanks for your quick response.
Is there any way I can point Sermon Browser in the right direction? I did try using the "sermon series" shortcode at one point, but it gave me a lot of content I didn't need while also not including download links with the audio players, which I do need.
I know PHP fairly well, although I'm not an expert. So if you could even give me an idea of the function or area of code I need to work with, I could probably figure out the rest.
Thanks again.
9:32 pm
Moderators
18 June, 2009
SuzanneM,
I'm not sure exactly what your are trying to do, and unfortunately, I won't have time to help you with much development work. But here is a quick overview of a few functions that might help you get started.
In sermon.php:
function sb_shortcode() interprets the "sermons" shortcode on WordPress pages and provides the output.
function sb_display_url() searches through your WordPress pages (via function sb_get_page_id()) looking for the best one to use as the "main" sermons page. This page is used in widget links.
In frontend.php:
function sb_widget_sermon() defines the recent sermons widget. Don't bother looking in widget.php; this is an old PHP file that is no longer used.
Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12
8:21 am
1 May, 2014
I have found a way to fix this that does not require any coding... I looked where Ben pointed the sb_get_page_id() function in sermon.php. I found that it uses a SELECT statement to search for the sermons page, apart from the details of the actual query I noticed that it takes 1 result ordered by date, so I merely made the page I wanted it to choose a year older than the others by changing the published date. I didn't need to change any of the logic of the SELECT statement.
"SELECT ID FROM ... WHERE ... ORDER BY post_date ASC LIMIT 1;"
Hope that helps someone else.
K
1 Guest(s)