Sermon-Manager icon indicating copy to clipboard operation
Sermon-Manager copied to clipboard

sermon_images shortcode should support ordrerby="sermon"

Open joelbyler opened this issue 5 years ago • 7 comments

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

joelbyler avatar Jul 23 '19 01:07 joelbyler

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

nikola3244 avatar Jul 29 '19 14:07 nikola3244

@nikola3244, currently I'm using the following

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

And its still sorting by sermon series name.

joelbyler avatar Aug 06 '19 00:08 joelbyler

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

nikola3244 avatar Aug 07 '19 13:08 nikola3244

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 avatar Aug 13 '19 00:08 joelbyler

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 avatar Feb 14 '20 00:02 joelbyler

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"]

joelbyler avatar Feb 14 '20 01:02 joelbyler

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?

Genevieve-K avatar Nov 29 '21 12:11 Genevieve-K