Forum

This forum is now read-only. Support is provided at https://wordpress.org/support/plugin/sermon-browser/

Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
Latest Sermons widget links go to wrong URL
30 January, 2014
5:32 pm
SuzanneM
Member
Members
Forum Posts: 4
Member Since:
30 January, 2014
sp_UserOfflineSmall Offline

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!

30 January, 2014
7:43 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

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

30 January, 2014
9:21 pm
SuzanneM
Member
Members
Forum Posts: 4
Member Since:
30 January, 2014
sp_UserOfflineSmall Offline

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.

 

 

30 January, 2014
9:32 pm
Ben Miller
Appleton, WI, USA
Moderator
Members

Moderators
Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

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

30 January, 2014
9:43 pm
SuzanneM
Member
Members
Forum Posts: 4
Member Since:
30 January, 2014
sp_UserOfflineSmall Offline

Thank you!! That's a great help.

1 May, 2014
10:57 pm
blueshrapnel
Member
Members
Forum Posts: 3
Member Since:
1 May, 2014
sp_UserOfflineSmall Offline

Hi

I have a similar problem, how did you fix it in the end? I've created some series posts to display a sermon series description and image, but unfortunately it doesn't change the url when you click on different sermons in different series via the sermons widget.

Thanks
K

2 May, 2014
8:21 am
blueshrapnel
Member
Members
Forum Posts: 3
Member Since:
1 May, 2014
sp_UserOfflineSmall Offline

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

Forum Timezone: Europe/London
Most Users Ever Online: 381
Currently Online:
Guest(s) 6
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Rich Brown: 358
Matt Schlueter: 93
Mindy: 72
Don Johnson: 65
anointed: 57
0be1: 55
Member Stats:
Guest Posters: 7
Members: 3188
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 2
Topics: 1713
Posts: 7499
Newest Members:
marktest, deatles50, ValeriaGoodriz, dapedPup, oapedPup, Margarettoimb
Moderators: Ben Miller: 1628
Administrators: Mark Barnes: 435