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

Fix Shortcode Pagination on Static Front Page #274

Open brianfreytag opened 4 years ago

brianfreytag commented 4 years ago

Types of changes:

Checklist:

Brief description of the proposed change:

It appears that between https://github.com/WP-for-Church/Sermon-Manager/commit/94e8f826387a5ae134e29b78b9fb3797b4e500e4 and https://github.com/WP-for-Church/Sermon-Manager/commit/ecfdbb7b772aa6801cbb1394dfd77ebc904a4854, PR #46 was reverted and static front page pagination was once again broken. This PR remedies this bug. Further, it seems like if you are on the first page, and the query parameter is empty, the Next button doesn't appear, so this will also default the value to 1 if neither paged nor page is defined.

Additionally, on static front pages, adding query strings to the end of the URL (https://yoursite.com/page/2/?page_id=873&p=873) will break the pagination functionality. It appears that these arguments are added by default on static front pages, most likely because the static front page suppresses the page information. In this PR, I check is_front_page() before adding the query strings to add_args in paginate_links(). This regression was added in https://github.com/WP-for-Church/Sermon-Manager/commit/92fb1e963056e7fa39a01ce19f4ee782f1aefc99.

Any other info:

I'm not sure why the main sermons page utilizes the standard Wordpress DOM for pagination but the shortcode does not. It requires dual-styling. This is outside of the scope of this PR, so it's something that might be discussed in the future.

brianfreytag commented 4 years ago

@nikola3244 Any chance we can get some movement on this?

brianfreytag commented 4 years ago

Is this project still maintained?

brianfreytag commented 4 years ago

@nikola3244 Hi. Can we get this merged?

brianfreytag commented 4 years ago

Anybody?

brianfreytag commented 4 years ago

Is this going to get merged?