Sermon-Manager
Sermon-Manager copied to clipboard
sermon_images shortcode should support ordrerby="sermon"
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
- Create multiple sermon series and add sermons to them with different "preached" dates
- Create a new page
- add
[sermon_images hide_title="yes" order="DESC" ordrerby="sermon_date"]
shortcode - 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
Hi, does it work when you set orderby="sermon"
or orderby="date"
?
@nikola3244, currently I'm using the following
[sermon_images hide_title="yes" order="DESC" ordrerby="date"]
And its still sorting by sermon series name.
Please try the following:
- Go to Sermons -> Settings
- "Advanced" tab
- Select "sm_update_21511_update_term_dates (2.15.11)" in option named "Specific Background Updates"
- Save settings
- Reload the page with the shortcode
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.
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.
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"]
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?