Opened 13 years ago
Closed 13 years ago
#21748 closed defect (bug) (duplicate)
get_pagenum_link() returns URL with pagination base for a singular paged content
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | major | Version: | |
| Component: | Permalinks | Keywords: | has-patch |
| Focuses: | Cc: |
Description
on this page I use an own plugin by a shortcode:
http://www.online1.hu/webdesign/
get_pagenum_link(2); returns
http://www.online1.hu/webdesign/page/2/
but it should make a difference:
front page: http://www.online1.hu/page/2/
other pages: http://www.online1.hu/webdesign/2/
Is it as bug??
Attachments (1)
Change History (11)
#4
@
13 years ago
four cases
URLs : get_query_var(), content relative to !--nextpage--
in case of the front page
/2/ : HTTP/404
/page/2/ : paged= page=2, after !--nextpage-- content
in case of a page
/2/ : paged=0 page=2, after !--nextpage-- content
/page/2/ : paged=2 page=, before !--nextpage-- content
#5
@
13 years ago
- Keywords has-patch added
get_pagenum_link() shouldn't use $wp_rewrite->pagination_base on single posts
#6
@
13 years ago
wp_link_pages() is the appropriate function to use for getting paged links for paginated posts as get_pagenum_link() is designed for archive pagination.
Supporting singular pagination in get_pagenum_link() as well might be a good idea though. However, looking at the patch (untested) it looks like it doesn't support pages. So, should it be checking is_singular() and not page_on_front, see _wp_link_page()?
#8
@
13 years ago
- Owner set to wonderboymusic
- Status changed from new to accepted
Patch refreshed to account for 1) search 2) posts / pages except for page on front 3) everything else
my front page is a static page,
links are: /%year%/%monthnum%/%postname%/