WordPress.org

Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#1391 closed enhancement (wontfix)

Allow per-author templates

Reported by: MC_incubus Owned by: rob1n
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: Template Keywords: dev-feedback 2nd-opinion
Focuses: Cc:

Description

Would be nice if you could do per-author templates, using the author ID, much like you can do now with per-category templates.

Change History (8)

#1 @MC_incubus
15 years ago

  • Patch set to No

#2 follow-up: @chuyskywalker
15 years ago

This would best be handled as a plugin. There are plenty of hooks for catching what template is about to be output and changing it up. As an example, Post Template Plugin will "hook" based on categories to change the file used when displaying a post. Taking that and extending it to "hook" for associated author ID's shouldn't be much of a leap.

#3 in reply to: ↑ 2 @rob1n
14 years ago

  • Milestone set to 2.2
  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned
  • Version changed from 1.5.1.1 to 2.1

Replying to chuyskywalker:

This would best be handled as a plugin. There are plenty of hooks for catching what template is about to be output and changing it up. As an example, Post Template Plugin will "hook" based on categories to change the file used when displaying a post. Taking that and extending it to "hook" for associated author ID's shouldn't be much of a leap.

I don't agree. There is other similar functionality in WP already (category-xx.php, etc.). Is this already in 2.1/2.2, though? I'll check.

#4 @rob1n
14 years ago

  • Keywords dev-feedback needs-patch added

#5 @rob1n
14 years ago

  • Component changed from General to Template

#6 @rob1n
14 years ago

  • Keywords 2nd-opinion added; needs-patch removed

It's not in 2.2, but I can write a patch for it if the devs agree that this is a good idea.

#7 @rob1n
14 years ago

  • Milestone 2.2 deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

Okay, I thought about this a bit, and I can't see the point for per-author templates. Per-category templates, yes, because you could run a link blog or something out of a certain category and you could make it look the part too.

But a per-author template just doesn't seem to have any use. I'm closing this as wontfix, if you can provide a valid argument for why it should be in here, reopen the ticket and add a comment to that effect, and I'll code up a patch for it. But, for now, wontfix.

#8 @majelbstoat
14 years ago

You could use it to simulate multiple blogs, if each author had a different a different template, showing their template whenever a single author's content was on display. But chuyskywalker is right - this is perfect plugin material, using template redirect, (and actually a pretty good idea).

Note: See TracTickets for help on using tickets.