add WP search to archive, limited to wpfc_sermon post type and AND match#159
add WP search to archive, limited to wpfc_sermon post type and AND match#159tstephen wants to merge 1 commit intoWP-for-Church:devfrom
Conversation
|
Thanks for the PR 👍
Actually, the form will be only added to the shortcode output. There might be a filter to add content into archive page "header", but I haven't researched it, and I doubt that it will work for all themes. Anyhow, I wonder, how is this different than adding a search form in widget[1]? (except that post type is hardcoded to
I personally think that there should be an option (and disabled by default for existing installations), since we don't want to break user's page layout on update. Many of them won't be aware of the change and will come to the support forum to (rightfully) complain when they find out that their layout is "broken". Also, plenty of churches (at least in our experience) had their website design done many years ago without any updates - because they hired a person/agency to do all the work since they don't know web development, and this type of changes would mostly be problematic to them. Also, let's have strings translated by putting them into correct translation functions. What are your thoughts about it? [1] - Or some other way if they are using a visual editor of some sort (such as Visual Composer or Elementor) |
|
As you maybe noticed, I accidentally manually added and released the code from this PR. That was not supposed to happen. I've removed it in 81781a2 and it will be officially removed in 2.11.2 once we fix another bug. My apologies for this, it was my mistake. |
|
Sorry it took me ridiculously long to return to this. You asked:
That's obviously fine if I happen to have a widget area in just the right place but otherwise it's not the same at all! As noted I'm trying to recreate the old Sermon Browser search functionality really but this seemed a suitable shortcut rather than trying to build something from scratch. Looking at it fresh now how do you feel about a [sermon_search] shortcode? Would you prefer to rely on the underlying WP search or something lower level? |
This PR adds a WordPress search form to the archive page.
Currently hard-coded are that it will return only WPFC sermons and applies 'sentence' search, in other words if you search Ruth and Eddie (one of our preachers) only matches of both will be returned.
I did wonder if it should be an option to exclude the new search form but I think it is a useful addition to everyone and I see search is listed on your Trello board. This is not search like Sermon Browser used to do it but I do believe it is more in keeping with WP guidelines and don't anticipate users having a problem understanding it (time will tell!).
Finally by adding a CSS class to the form it can be pretty easily integrated into different themes.
Hope you like it but if not please suggest changes.