|
#1
Feb 21, 2009, 03:14 PM
|
|
|
|
3 posts · Feb 2009
Toronto, Canada
|
|
[SOLVED] Question About Multiple Page Templates in Atahualpa
I helped a charity to install Atahualpa to be used on a site for a charity and, after working with many Wordpress themes over the years, was just blown away with the configurability of your theme. This is an amazing piece of work.
I have a question about how best to get multiple page templates.
What I'm trying to achieve is:
1. a website with many pages all sharing the same page template, with the website look
2. a blog linked off the top tool bar with the standard blog posts
3. and some Wordpress "pages" attached to that blog in #2, with more of the blog look
I know that recent Wordpress can also act as a CMS site and that you can have several "Page Templates" (e.g. page.php, blogpage.php). However, it appears I would lose the configurability of Atahualpa if I used this method, because I don't think it supports this multiple-page template feature.
Can you suggest a way to achieve what I want to do? Or, are there future plans to offer this.
Thanks for your suggestions.
Regards, Randall
Last edited by RandallJHoward; Feb 21, 2009 at 03:17 PM.
|
#2
Feb 21, 2009, 06:41 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
You can actually copy index.php to page.php, single.php etc... and then edit the appropriate files, i.e. page.php
|
#3
Feb 22, 2009, 01:37 PM
|
|
|
|
3 posts · Feb 2009
Toronto, Canada
|
|
So, if I do that, could you please clarify how having separate page templates interacts with all the configuration inherent in Atahualpa.
Is there a way for each page to have separate configuration parameters, or do all page templates share the same Atahualpa parameters? The reason I ask is that I suspect the main differences between the page templates would be things that could be set as configurable parameters and that would involve writing less CSS + PHP code to achieve the effect. This would also be good because it would likely be easier to manage during updates to your theme.
|
#4
Feb 22, 2009, 02:15 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
I am not sure if I understood your question but perhaps you don't know that Wordpress has a built in template system:
Wordpress looks for a page.php if a "page" page is requested, and then for index.php. Atahualpa does not have a page.php by default, but if you make a copy of index.php as page.php and upload it, then WP will find it the next time a "page" page is requested and use the page.php to display a "page" page instead of the index.php.
Now many contents of your page.php would be redundant, for instance the queries "is this a page" because page.php is always going to be a page.
Copying index.php to page.php and editing that page.php would be ONE way (the usual way) to create a different layout or functionality for page pages.
But you could as well use index.php for everything (As done by Atahualpa) and add additional "if this is a page" or "if this is page XX" conditions into index.php to display things differently on page pages.
|
#5
Feb 22, 2009, 02:26 PM
|
|
|
|
3 posts · Feb 2009
Toronto, Canada
|
|
I see the confusion. I want to have TWO page templates. One for blog-related pages and the other for website-related pages. I know Wordpress currently supports that, as well as selection of which template is used in the WP editor. What I don't know is how well this will work with Atahualpa's own configuration.
|
#6
Feb 22, 2009, 02:45 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
You can set the front page to be a static page as you already seem to know, and then you can see where you are at inside index.php with
PHP Code:
<?php if ( is_front_page() ) ?> Stuff to display only on front page, i.e. domain.com/ <?php } ?>
and
PHP Code:
<?php if ( is_home() AND !is_paged() ) ?> Stuff to display only on homepage of blog posts, i.e. domain.com/blog/ <?php } ?>
or
PHP Code:
<?php if ( is_home() ) ?> Stuff to display only on homepage of blog posts, including page 2, page 3... ,i.e. domain.com/blog/, domain.com/blog/page/2/, domain.com/blog/page/3/ <?php } ?>
|
#7
Apr 10, 2010, 01:28 AM
|
|
|
30 posts · Nov 2009
Melbourne, Australia
|
|
Hi there
Just wondering if someone can help me with this multiple template thing as I think I've been following Flynn's instructions:
• Went to /public_html/wp/wp-content/themes/atahualpa
• Found 'index.php' and copied the file into the same directory, giving it the name nlp-template.php
• Downloaded this file, opened it in text editor, added the code
<?php
/*
Template Name: nlp-template.php
*/
?>
(I didn't delete anything from the original file - just added this code on top)
• Saved the file (nlp-template.php), uploaded it back to the atahualpa directory, overwriting the copy that was there.
Now I'm baffled!
I have created a draft page to add to http://catsbodycrafts.com.au/wp offering a different type of service. The new page needs to have a different logo at the top (and in the future, I’ll no doubt make other changes!).
Where do I go to make those changes (in nlp-template.php)?
How do I find the drop down box to select which template to use for this page?
As you can see, I’m a simple kinda gal so step by step (dot that ‘i’, cross that ‘t’) instructions would be great!
Cheers
Cathy
|
#8
Apr 18, 2010, 09:16 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
when you say you need a different logo, are you talking about the header image because that is easy to do. i.e. you can have one image for most of the pages, then have a different image for page 'X', 'Y' and 'Z' and it's all done thru CSS inserts.
If you just want different images, see http://forum.bytesforall.com/showthread.php?t=4389
if you want an entre different header structure, see http://forum.bytesforall.com/showthread.php?t=6681
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Last edited by juggledad; Apr 21, 2010 at 05:18 AM.
|
#9
Jul 29, 2010, 01:20 PM
|
|
|
291 posts · May 2009
Texas and New Mexico
|
|
I want to revive this thread for a quick question. I have a new client that wants a choice between two page templates. One template is a 3 column, no problem, the other is a 2 column, with the main column spanning to the left margins. (basically combing the left sidebar and middle column) Everything else, header, right sidebar etc. would remain the same. I'm not a programmer but reading from the above info, it can be done. Am I correct?
Thanks,
Sleenie
|
#10
Jul 29, 2010, 06:41 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
You can exclude the side bars for a page by just adding the page ID to the ato->Style & configure sidebars->Left sidebar: don't display on pages
There is an exclude option for each sidebar - easier than coding a template
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11
Jul 30, 2010, 08:35 AM
|
|
|
291 posts · May 2009
Texas and New Mexico
|
|
Yes, I have used that in the past. However, they want however the space gone, meaning the center content would get moved to the left for just that page (where the left sidebar would normally be) and continues to the right sidebar. Does that make sense?
Sleenie
|
|