[theme-reviewers] Page Template Files in Sub-Folders
Robert Ambartsumov
robert6292 at gmail.com
Wed Jul 27 23:05:41 UTC 2011
use get_template_part( 'subfolder/file')
On Thu, Jul 28, 2011 at 1:59 AM, Emil Uzelac <emil at themeid.com> wrote:
> The only option I could think of from top of my head is:
>
> <?php
> /*
> Template Name: Blog
> */
> ?>
>
> <?php get_template_part( 'blog-template'); ?>
>
> But with this you're not gaining whole lot.
>
> Basically i.e. blog.php is a placeholder and blog-template.php is the
> actual template.
>
> Emil
> ----
> *Emil Uzelac* | ThemeID | T: 224-444-0006 | Twitter: @EmilUzelac | E:
> emil at themeid.com | http://themeid.com
> Make everything as simple as possible, but not simpler. - Albert Einstein
>
>
>
> On Wed, Jul 27, 2011 at 5:26 PM, Sayontan Sinha <sayontan at gmail.com>wrote:
>
>> Hi,
>> Is there a way to have page templates in a sub-folder of a theme or do
>> they have to be in the root folder? I know that using filter hooks an a
>> template from a sub-folder can be added to the drop-down list of templates
>> in the "Edit Page" screen (the way BP does it). Is there an easier way to do
>> this?
>>
>> Regards,
>> Sayontan.
>>
>> --
>> Sayontan Sinha
>> http://mynethome.net | http://mynethome.net/blog
>> --
>> Beating Australia in Cricket is like killing a celebrity. The death gets
>> more coverage than the crime.
>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110728/2478b524/attachment.htm>
More information about the theme-reviewers
mailing list