sage icon indicating copy to clipboard operation
sage copied to clipboard

Front Page Template ?

Open expertpixels opened this issue 14 years ago • 6 comments

Hey guys,

Just wondering what happened to the front-page.php template ? I was quite enjoying using this template to make the feel of the design not feel like a stock standard WP theme.. Can i just make a copy of the base.php template and rename it front-page.php ?

Sorry ive not been very active the past few weeks and it would seem ive missed lots of Roots updates.. Thanks again Ben for your work.. the theme and file structure seems like it's progressed very nicely.

Regards, Darren

expertpixels avatar Sep 04 '12 12:09 expertpixels

if you enjoyed using roots before the wrapper you should enjoy using it many times more after figuring out how it works

you won't want to copy base.php most of the time. all you need to do is:

  1. copy page.php to something like page-home.php
  2. copy content-page.php to something like content-page-home.php
  3. edit page-home.php in the root to reference the new content-page-home.php by doing: get_template_part('templates/content', 'page-home');

then, if you want that page template to be without the sidebar, open lib/config.php and edit roots_sidebar to something like:

if (is_404() || is_front_page() || is_page_template('page-custom.php')) {

ps. please use the google group for questions

retlehs avatar Sep 04 '12 13:09 retlehs

Thanks Ben.. Sorry for opening a "Issue" I will join the group for further questions.

Thanks again for your excellent work :)

Regards, Darren

expertpixels avatar Sep 04 '12 13:09 expertpixels

Sorry for asking a question about it here, but this method did work for me i 6.1.0, but now in 6.3.0, I can't seem to get it to work, is this an issue? In google groups ppl are talking about base-home.php :(

hixen avatar Feb 13 '13 07:02 hixen

The issue with this three files, works too ? base-front-page.php

front-page.php // 1

templates//content-front-page.php

Which method wille better ?

Am I wrong with this way ?

Thanks

xavierartot avatar Dec 30 '13 16:12 xavierartot

avoid a new base template unless absolutely necessary - make a front-page.php and you can keep everything in there, or you can reference a template from the templates/ dir in there

retlehs avatar Dec 30 '13 16:12 retlehs

Thanks

xavierartot avatar Dec 30 '13 18:12 xavierartot