WP-for-Church / Sermon-Manager

Sermon Manager for WordPress is the #1 plugin for churches who want to manage their sermons easily and missionally.
https://wordpress.org/plugins/sermon-manager-for-wordpress/
GNU General Public License v2.0
44 stars 34 forks source link

Sortlist problem when nothing selected #43

Closed paulkosciecha closed 7 years ago

paulkosciecha commented 7 years ago

When using the sortlists to filter the content this works fine when you select a series/preacher etc. However, when you then go back to having no item selected you do not return to the sermon list, but to the blog page.

paulkosciecha commented 7 years ago

Hi, I've managed to bypass this problem on my install. The solution I've used is to set 'Common Base Slug' to on in the sermon manager settings. I've then modified the template-tags.php file so that the action is not just calling the home_url(), but home_url().'/sermons/' . This way, when the value is empty it resolves to the sermons page. The issue is to do with the submit action url which directs to the homepage when the selection is empty.

nikola3244 commented 7 years ago

Hey @paulkosciecha, could you make a pull request so we could make this fix official? :+1:

paulkosciecha commented 7 years ago

Hi nikola3244. The solution that I've put in place isn't a full fix, just a work around that means it works on my site. If 'Common Base Slug' is not set to on then it doesn't work.

nikola3244 commented 7 years ago

Oh, I see. Okay, I'll take a look and make a proper fix. Thanks for the report :slightly_smiling_face:

paulkosciecha commented 7 years ago

Hi, just checked your fix. It's still not working. Try clicking on a series title to go to a series page - url is something like - http://www.siteurl.com/series/series-title . The sortlists are showing. When you then try to use the sortlist you go to a 404 page.

nikola3244 commented 7 years ago

Hey @paulkosciecha, I encountered the same issue after you mentioned it. Try saving plugin settings again (open Sermon Manager settings page and without modifying any data - click on "Save Changes"). That seemed to resolve the issue on my end

paulkosciecha commented 7 years ago

sorry, that doesn't appear to work for me. Because it points to a 'series' page rather than the 'sermons' page it fails.

nikola3244 commented 7 years ago

Hey @paulkosciecha, can you try with the latest fix?

Thanks

paulkosciecha commented 7 years ago

Yes, great. That does the trick.

nikola3244 commented 7 years ago

Perfect. Glad to hear that it's resolved :slightly_smiling_face: