Fix Shortcode Pagination on Static Front Page#274
Open
brianfreytag wants to merge 1 commit intoWP-for-Church:devfrom
Open
Fix Shortcode Pagination on Static Front Page#274brianfreytag wants to merge 1 commit intoWP-for-Church:devfrom
brianfreytag wants to merge 1 commit intoWP-for-Church:devfrom
Conversation
It appears that at some point when the code was updated to an OOP approach, PR WP-for-Church#46 was reverted and static front page pagination was once again broken. This PR remedies this bug. 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, so I check `is_front_page()` before adding the query strings to `add_args` in `paginate_links()`.
Author
|
@nikola3244 Any chance we can get some movement on this? |
Author
|
Is this project still maintained? |
Author
|
@nikola3244 Hi. Can we get this merged? |
Author
|
Anybody? |
hermify
approved these changes
Aug 27, 2020
Author
|
Is this going to get merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes:
Checklist:
Brief description of the proposed change:
It appears that between 94e8f82 and ecfdbb7, 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
pagednorpageis 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 toadd_argsinpaginate_links(). This regression was added in 92fb1e9.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.