[wp-hackers] WP_Rewrite: Disable post/Page paging ability?

Andy Skelton skeltoac at gmail.com
Tue Jul 22 01:56:09 GMT 2008


> On Mon, Jul 21, 2008 at 11:20 PM, Viper007Bond <viper at viper007bond.com> wrote:
>> I need to be able to have numeric stubs on a bunch of children pages.
>> However a bug is stopping me from doing so:
>> http://trac.wordpress.org/ticket/5305
>>
>> How can I, assuming it's possible, remove the ability for multi-page posts
>> and Pages (I don't use that feature) so that I can have numeric stubs for
>> children Pages? Basically I want to work around the bug if it's possible by
>> giving up a feature I don't use.

This reminds me of a feature in rewrite.php which matches numeric
stubs on attachments by adding a rewrite rule for the explicit form:
/page-slug/attachment/numeric-slug/
e.g.
/about/attachment/53/

This also required some logic in the functions that create attachment
permalinks, basically to detect an all-numeric slug and add
"/attachment" in the path.

You probably don't want to add to the path, so let's assume you'd
rather get rid of the rules that match the paged pages. Filter
page_rewrite_rules.

Cheers,
Andy


More information about the wp-hackers mailing list