Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

[SOLVED] setting a virtual template for the front page


  #1  
Old Jun 19, 2013, 04:23 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Hi everyone,

So I am creating my first website in Montezuma, and I can't figure out how to get my front page to use a different template. My front page is a static page named "home".

So I made a main template called "slider.php" that I want to apply to the front page, but when I assign the page "home" to the slider.php template, it does not work.

I also tried changing the main template "index.php" and assigning the "home" page to it. But that didn't work.

Can someone help?

Thanks!
Emanuel
__________________
Emanuel
http://www.sferios.com
  #2  
Old Jun 19, 2013, 04:40 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Ok I have learned more. The virtual main template is actually working fine. It's a sub template that is not embedding into the virtual template. I made a sub template called "header2.php" and the following code in the virtual main template is not working:

<?php get_header2(); ?>

What am I not understanding here? How do I embed a newly-created sub template into a new main template?
__________________
Emanuel
http://www.sferios.com
  #3  
Old Jun 19, 2013, 04:48 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
So continuing... I got rid of the header2.php sub template and just put the code directly into my slider.php main template. That seems to work, but ONLY for page-type pages. When I assign it to my statically-defined front page (called "home") it does not work.

So it seems there is a problem trying to assign the front page to a virtual template. Or at least I'm still not getting it.
__________________
Emanuel
http://www.sferios.com
  #4  
Old Jun 19, 2013, 05:06 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Ok I found in the instructions that you are supposed to be able to add a new header sub template to a main template by using this php code:

<?php get_header( '2' ); ?>

But it didn't work. I named the sub-template header-2.php like I was supposed to, and I called it up in my new main template (slider.php) using the php code above. Then I assigned slider.php to my front page ("home") with no luck. Then I tried assigned slider.php to a regular page on the site and it also did not work.

Sooooo.....

I am still stuck trying to figure out two things:

1. How to get a new main template to appear on a static front page.
2. How to embed a sub template into a new virtual main template.

Thanks!
__________________
Emanuel
http://www.sferios.com
  #5  
Old Jun 19, 2013, 05:16 PM
jerryc
 
367 posts · Oct 2012
Florida
See this post.
  #6  
Old Jun 19, 2013, 05:34 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Thanks jerryc.

That answers my second question, but I still cannot assign a new template to my front page (a static page) no matter what I try.
__________________
Emanuel
http://www.sferios.com
  #7  
Old Jun 19, 2013, 05:43 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Just to clarify, when I edit index.php, single.php and page.php, everything works as it should and the changes display correctly on their respective pages.

But none of those templates seem to work for the "front" page when it's assigned as a static page. And furthermore, when I create a new main template (say, slider.php) and assign it to that static page, it STILL does not display.

What template is the front page using? Where do I edit it? Or how do I assign a new template to my static, front page?

Thanks anyone!
__________________
Emanuel
http://www.sferios.com

Last edited by emanuel1969; Jun 19, 2013 at 06:59 PM.
  #8  
Old Jun 19, 2013, 09:34 PM
jerryc
 
367 posts · Oct 2012
Florida
Quote:
Originally Posted by emanuel1969
Thanks jerryc.

That answers my second question, but I still cannot assign a new template to my front page (a static page) no matter what I try.
Try naming that template front-page.php. That's what Juggledad told me, and it's worked flawlessly ever since.
  #9  
Old Jun 19, 2013, 10:04 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
OMG that was too simple. How come that is not explained anywhere? Or is it.

Thanks jerryc
__________________
Emanuel
http://www.sferios.com

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help setting up page template for Jigo Shop Tim F Plugins & Atahualpa 8 Feb 15, 2013 03:49 PM
Error on Page / Virtual Template = image colin123456 Montezuma Theme 1 Jan 28, 2013 03:49 AM
once I create a virtual template, where do I edit it. LGL Montezuma Theme 1 Jan 16, 2013 03:58 PM
PATCH 113-03: Using 'the_content()' in a virtual template may incorrect results juggledad New Versions & Updates 0 Jan 6, 2013 02:07 PM
[SOLVED] Edited virtual template changes not showing up jerryc Montezuma Theme 2 Oct 5, 2012 10:24 PM


All times are GMT -6. The time now is 09:53 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.