Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination on lessons pages is not consistent. #69

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

MaximilianoRicoTabo
Copy link

  • Filter navigation sql query to get next post and previous post by menu_order
image image

All Submissions:

Make sure the code does what it says - done -
No fatal errors when running it. - done -
Run through WPCS - done -
Are comments clean and readable? - done -
Are function or class names named correctly? - done -
Does the code follow the way we’ve done it before? - done -

Changes proposed in this Pull Request:

Hook into get_next_post_where, get_previous_post_where, get_next_post_sort and get_previous_post_sort filters to
Replace the SQL query where and order by clauses string to sort adjacent posts by menu_order instead of post_date.

Resolves #67

How to test the changes in this Pull Request:

Check steps described in issue above

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.

Added filters callbacks for get_next_post_where, get_previous_post_where, get_next_post_sort and get_previous_post_sort to get proper results

 * Filter navigation sql query to get next post and previous post by menu_order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination on lessons pages is not consistent.
1 participant