Opened 16 years ago
Last modified 6 years ago
#7231 accepted enhancement
wp_link_pages: option next_and_number
Reported by: | jan831 | Owned by: | sorich87 |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch needs-refresh needs-testing |
Focuses: | template | Cc: |
Description
with the next_or_number option of the wp_link_pages() function, it would be nice to have the option to use both.
it gives the user the opportunity to easily go to the next/previous page, without loosing the other option of going immediately to a certain page
example:
next 1 2 3 4 5 6 previous
Attachments (7)
Change History (20)
#3
@
16 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from 2.8 to Future Release
broken patch
#7
@
14 years ago
- Keywords has-patch added; needs-patch removed
- Owner changed from anonymous to sorich87
- Status changed from new to accepted
Here is a new patch.
#10
@
9 years ago
Ok. I've reworked this patch and uploaded 7231.2.patch
There appears to be no default styling in Twenty Fourteen, TwentyFifteen or TwentySixteen accommodate for the "Next" and "Previous" links created by this function before this patch. As such in the course of creating this patch I manually added styling to those themes for testing. Samples of what I saw for these themes have also been uploaded.
My patch also adds classes, "next" and "previous" to the relevant links to allow for them to be styled. See below.
.page-links .previous, .page-links .next { width: auto; }
I don't know how best to address this within the patch. So, my guess is to open an additional ticket for that styling to be considered for inclusion.
And now, the parameter "next_or_number" now is mis-named as the existing two options now included a third. I suspect we would keep the parameter name for the time being and/or introduce something like "pagination_style" going forward. I have left the parameter name as is for the time being.
patch to add this functionality (applies to /trunk/)