[theme-reviewers] Option to create child theme from theme option

Otto otto at ottodestruct.com
Wed Jan 22 21:12:33 UTC 2014


On Wed, Jan 22, 2014 at 3:03 PM, emin ozlem <eminozlem at gmail.com> wrote:
> Basically the user will select how they want the posts to be displayed on
> that particular page lets say from select boxes or appropriate inputs like
> so;
>
> I want to create a page template that displays <input>30</input> posts from
> <select> Uncategorized | Other </select> category, ordered by <select> ID |
> date </select>  etc. you get the idea.
>
> Essentially it'll just save the wanted query params in an option, and load
> them in "page.php" if chosen. Thats about it. No different than manually
> creating page-custom.php and writing in the query params by manually.
>
> Does that sound OK ? It'd make it whole lot easier, and would save the
> trouble of updating every page-* template file one by one, in case of a
> markup change.

Okay, the question I would have in such a case is a bit deeper though:
Why would that be a Page Template?

For your particular example, you're saying X posts from a category
sorted by whatever, but that kinda describes a category-archive page,
no?

I mean, I can totally see having special code somewhere to have
different category archives behave differently. But I probably
wouldn't do it as a "Page Template", because, well, Page Templates are
for Pages. Pages don't show Posts.

Too often I see people misuse Page Templates in particular. Sure,
they're easy, but really things like archives are already built in.
It's simpler to me to properly use the template hierarchy, and then,
if desired, add a rewrite rule to change the URL you want to point to
the category archive you want it to point to.

See? It's all about the specific details.

-Otto


More information about the theme-reviewers mailing list