Link to home
Start Free TrialLog in
Avatar of steva
steva

asked on

Can't find template files

I notice when I create a new page on my WordPress site that that the Page Attributes | Templates drop down has options for Business, Portfolio, Magazine, and others, but I don't see anything named Business.php, etc, in the Themes folders for the site, either for the main theme, Genesis, or the child theme.   Where are these templates?

Thanks for any help.
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

It's complicated.  

The base page templates are not actually template files like a vanilla WordPress theme uses.  Instead, they are dynamically set in the Genesis parent and through the use of the Genesis hooks, you can achieve big changes in layout with a few commands.  

This series of articles does a good job explaining how Genesis actually works.  Nick is one of two people who really, really understands Genesis inside and out:

http://designsbynickthegeek.com/tutorials/genesis-explained-the-framework

And if you are looking to remove templates from the list, Bill Erickson (the other person who is my go-to reference on Genesis) has an article for that:

http://www.billerickson.net/remove-genesis-page-templates/
Avatar of steva
steva

ASKER

Hi Jason,

Just when I felt like I was understanding how to apply  custom templates through the template hierarchy, Genesis throws that all out for for something more complicated! While the Genesis articles you sent look interesting I'm hoping I don't have to master it all  to do what I want, which really seems very simple.  

 I want a full page blank template where I can lay in the HTML to show a table of database records.  When I create that page I want to assign that "blank" template from the Page Attributes| Template drop down.   It looks like the article you sent a few posts back by Neil Gee might do that for me.  

Second, each record in this table is used eventually to construct a page.  The template assigned to all these pages needs to be the same, where I can set where three images go, where certain text fields go, etc.  The pages will all look the same, except they'll have different images and different text. Somehow I need to identify all these pages by some "type,"  "category," or whatever, that will cause them all to get this second "listing"  template.

Do you think there's a relatively easy way to do this with Genesis?

Thanks for your help. I appreciate it.
Just when I felt like I was understanding how to apply  custom templates through the template hierarchy, Genesis throws that all out for for something more complicated!

Not really.  The WordPress template hierarchy still works just like the Codex says it will work.  Genesis gives you the default templates in an effort to prevent you from having to create your own...you don't have to use them nor do you really need to know exactly how those defaults work.

I'm hoping I don't have to master it all  to do what I want, which really seems very simple.  

Seems is the operative word.

It looks like the article you sent a few posts back by Neil Gee might do that for me.  

Yes, that should create a blank page template and assign it to the templates drop down if you follow those instructions.

Somehow I need to identify all these pages by some "type,"  "category," or whatever, that will cause them all to get this second "listing"  template.

So in reality you don't want pages as Pages (in WordPress lingo), what you want to do is create a new Custom Post Type which can have its own template files based purely off taxonomy (e.g. single-whatevertaxname.php) and use that to hold this kind of content.

Alternatively, if you absolutely must make these pages WordPress Pages, I would make them child pages.  If you do that, there are relatively simple functions available all over the place that checks to see if a page is a child of a particular parent and then assigns it a new template of your choice.
Avatar of steva

ASKER

So in reality you don't want pages as Pages (in WordPress lingo), what you want to do is create a new Custom Post Type which can have its own template files based purely off taxonomy (e.g. single-whatevertaxname.php) and use that to hold this kind of content.

Yes, that sounds like it would work.   I don't see any reason for these pages to be WordPress "Pages" as long as they can still be accessed from the internet.

Alternatively, if you absolutely must make these pages WordPress Pages, I would make them child pages.  If you do that, there are relatively simple functions available all over the place that checks to see if a page is a child of a particular parent and then assigns it a new template of your choice.

That sounds promising too.  Just in case I have to make them WordPress Pages could you point me to one of the functions that does what you described above?

Thanks again.
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial