Make WordPress Core

Opened 13 years ago

Closed 8 years ago

#15324 closed enhancement (wontfix)

There needs to be a page_base in rewrite.php

Reported by: nkuttler's profile nkuttler Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Rewrite Rules Keywords: dev-feedback needs-refresh close
Focuses: Cc:

Description

I'm not sure why this feature doesn't exist. It looks trivial and important. There are many reasons for putting pages at, say, /page/%pagename%. The attached patch makes it possible to write a plugin to allow this.

Attachments (1)

page_base.diff (778 bytes) - added by nkuttler 13 years ago.
First patch

Download all attachments as: .zip

Change History (12)

@nkuttler
13 years ago

First patch

#1 follow-up: @scribu
13 years ago

Erm, what about pagination, i.e. /page/2 ?

#2 follow-up: @scribu
13 years ago

Ideally, this should be transparent in regards to other hierarchical post types.

#3 in reply to: ↑ 1 @nkuttler
13 years ago

Replying to scribu:

Erm, what about pagination, i.e. /page/2 ?

I think that's more of a documentation problem. The page base could conflict with the pagination base, but that's something the plugin/theme developer should probably take care of.

#4 in reply to: ↑ 2 @nkuttler
13 years ago

Replying to scribu:

Ideally, this should be transparent in regards to other hierarchical post types.

With this patch pages can get permalinks more like custom post types. The CPTs still have the with_front parameter, and adding the front to the page permalink is not possible with this patch. I'm not sure if this should be made possible though.

#5 @nkuttler
13 years ago

  • Owner nkuttler deleted
  • Status changed from new to assigned

#6 @markjaquith
13 years ago

  • Milestone changed from Awaiting Review to Future Release

#7 @nacin
13 years ago

I'm not a fan of this. You'll probably want to actually leverage a CPT rather than pages in this case, as that's the only real difference. Especially since this patch doesn't take into account rewrite rule generation, as the catchall, or without regard to verbose rules either.

This should probably be done through register_post_type instead. Ideally we can begin to move pages and posts more in the direction of CPTs in terms of dogfood, very similar to what we did in 3.1 with categories and tags.

#8 @scribu
13 years ago

Related: #15082

#9 @chriscct7
9 years ago

  • Keywords needs-refresh added; has-patch removed

Patch needs a refresh but someone from core should re-review this ticket before that happens.

#10 @chriscct7
8 years ago

  • Keywords close added

Per comment:7

#11 @johnbillion
8 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.