[SOLVED] setting a virtual template for the front page
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 |
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? |
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. |
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! |
See this post.
|
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. |
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! |
Quote:
|
OMG that was too simple. How come that is not explained anywhere? Or is it.
Thanks jerryc |
All times are GMT -6. The time now is 05:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.