Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This question already has an answer here:

I want the start page to be editable from a template. At the moment I can only edit the content by directly editing the HTML.

Setup:

  • Settings » Read » "Front page displays Your latest posts"
  • The template that shows in the startpage is index.php

I want to be able to create a page edited from the Pages list that will show as the start page.

I've tried to create a new page called MyStartPage. Set its template to Startpage (index.php).

I've tried setting Settings » Read » Front Page displays Static page MyStartPage

I've made sure the index.php has The Loop that makes the calls to get Title and Content as is working in other templates.

share|improve this question

marked as duplicate by Chip Bennett, kaiser, onetrickpony, s_ha_dum, t f Oct 21 '13 at 14:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
    
Im reading your links but im not getting what i should do. –  Lautaro Oct 21 '13 at 12:45
1  
See also: WordPress Template Hierarchy –  Chip Bennett Oct 21 '13 at 12:49
    
Thats quite a lot altogether. Although i will read it all to understand better, is it possible you could guide me on how to fix it for now? –  Lautaro Oct 21 '13 at 13:15
    
"is it possible you could guide me on how to fix it for now?" That is what I attempted to do, with the linked blog post. StackExchange sites are not really designed to handle such queries. –  Chip Bennett Oct 21 '13 at 13:16

2 Answers 2

up vote 0 down vote accepted

If you are editing a theme or you are having a child theme, You can make your own custom template, give it a name Include header and footer in it using

<?php
 /**
  * Template Name: Home Page
  * 
  * Home page Layout
 */
 get_header(); ?>
 <!-- Do whateveer you want here -->
 get_footer(); ?>

When you create a page in backend you'll get an option to select the template for the page i.e Home Page, assign the template you just created Home Page Template

and set this page as home page from settings.

share|improve this answer
    
THANKS! It works. BUT the page i created shows in the menu as well as being the startpage. This is not ok. Can i make it unvisible from the menu except being the home? –  Lautaro Oct 22 '13 at 11:45
    
Sorry. The page has to show ofcourse. There was already a homeapg link at the start menu but it was hardcoded so i removed it. –  Lautaro Oct 22 '13 at 12:01

Rename it to front-page.php. That one is loaded on the home page before attempting to load home.php, regardless of your "Read" settings.

share|improve this answer
1  
Of course index.php is a valid template. It's the default fallback template file for all contexts. Also, home.php is only used to display the blog posts index, regardless of whether the blog posts index is set to display on the site front page or on another page. –  Chip Bennett Oct 21 '13 at 12:28
    
I think someone hijacked the one trick pony account. –  kaiser Oct 21 '13 at 12:52
2  
Well thank you, that's flattering :) But I do make mistakes sometimes, just like everybody else –  onetrickpony Oct 21 '13 at 12:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.