[wp-trac] [WordPress Trac] #9324: Let wp_link_pages do pagination
when static page is used for front page
WordPress Trac
wp-trac at lists.automattic.com
Thu Mar 12 17:20:02 GMT 2009
#9324: Let wp_link_pages do pagination when static page is used for front page
--------------------------+-------------------------------------------------
Reporter: ev3rywh3re | Owner: anonymous
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: Template | Version: 2.8
Severity: normal | Keywords: wp_link_pages, has-patch,needs-testing
--------------------------+-------------------------------------------------
Mentioned on WP-Hackers. If a static paginated page is used for the front
page and wp_link_pages is used in the theme, the pagination links will
return 404 because get_permalink will return the front page URL as the
root of paginated links. I marked it as a bug since it can cause 404
errors if you don't know about it.
The enclosed patch tests for is_front_page and static pages using
alternate _get_page_link functions for paginated content and using
get_permalink for standard paginated links. It even works when a child
page is set for the front page.
This was a quick patch from a custom function, so it could probably be
written a little better.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9324>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list