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

sermon_images shortcode should support ordrerby="sermon" #263

Open joelbyler opened 5 years ago

joelbyler commented 5 years ago

Expected Behaviour

The following short code should render a list of sermon series by "preached" date with the most recently "preached" sermon series listed first

[sermon_images hide_title="yes" order="DESC" ordrerby="sermon_date"]

Maybe I'm doing this wrong? I'm not sure, I checked the documentation and the code here on GH but couldn't find a way to do this. It seems like it would be a common use case for this shortcode though.

Actual Behaviour

Sermon series' are listed in alphabetical order.

Steps To Reproduce

  1. Create multiple sermon series and add sermons to them with different "preached" dates
  2. Create a new page
  3. add [sermon_images hide_title="yes" order="DESC" ordrerby="sermon_date"] shortcode
  4. view the page and see that the sermon series image list is by alphabetical order by title instead of using sermons within the series to sort them.

Platform

Sermon Manager Version: 2.15.15 WordPress Version: latest hosted on WP.com PHP Version: latest hosted on WP.com

Any Additional Info

nikola3244 commented 5 years ago

Hi, does it work when you set orderby="sermon" or orderby="date"?

joelbyler commented 5 years ago

@nikola3244, currently I'm using the following

[sermon_images hide_title="yes" order="DESC" ordrerby="date"]

And its still sorting by sermon series name.

nikola3244 commented 5 years ago

Please try the following:

  1. Go to Sermons -> Settings
  2. "Advanced" tab
  3. Select "sm_update_21511_update_term_dates (2.15.11)" in option named "Specific Background Updates"
  4. Save settings
  5. Reload the page with the shortcode
joelbyler commented 5 years ago

Tried that and am not seeing any changes, it appears to still be ordering by the sermon series title so I need to give each sermon series a number at the beginning of the title so they sort correctly.

Below is the output of running that background update.

Screen Shot 2019-08-12 at 8 23 06 PM
joelbyler commented 4 years ago

Hey @nikola3244, any news on this? I'd be willing to try and work on a PR but I'm not sure I understand that much about how this plugin works. Maybe you can give me some advice? Its been a while that this has been open hoping theres some good news.

joelbyler commented 4 years ago

Actually maybe we can close this, looked thru the docs again and switched to this instead and it seems to work. [sermon_images display="series" order="DESC" orderby="id" size="sermon_small"]

Genevieve-K commented 2 years ago

Hi, I cannot display the series with the sermon date order. I launched the updater "sm_update_21511_update_term_dates (2.15.11)". In my database, the date of sermon_date_{sermon_id} in wp_termmeta is correct. But with orderby="id", the order is by id, not by date. And with orderby="date" or orderby="sermon", there is no answer: No images found. Could you help me?