WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#7785 closed defect (bug) (wontfix)

Page Template

Reported by: gmcosta Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.6.1
Component: Template Keywords: index.php template
Focuses: Cc:

Description

I'm currently using wordpress for a client project.
In the client site I use just pages, and every page has it's own custom template.


01 - home page (home.php)
(with a picture with a link that goes to products page);
02 - contact page (contact.php);
03 - about page (about.php);
04 - products page (products.php)
(with a javascript slideshow and lightbox);


The problem occours when I delete "index.php" from my theme.
I go to Write Page panel, try to find Page Templates, to assign a template to a page, but Wordpress doesn't show the box of Page Templates, just because I deleted a file that I won't use in my theme.

know what I mean?
I guess index.php it's not necessary if home.php it's in use.
Waiting for reply from you guys,
and thanks for now.

Change History (3)

comment:1 @jacobsantos6 years ago

  • Keywords index.php reporter-feedback added; index missing problem with templates removed
  • Milestone changed from 2.7 to 2.8

Index.php is not required if you are using a parent theme. However, you must have it for fallback.

The ticket is not phrased as a defect ticket and sounds more like a support question. Tickets do not ask questions, they are statements of fault and hopefully provide solutions for fixing the problem.

You neither give enough information for what your problem is nor enough information on a solution for the problem.

Please rephrase the ticket or it will most likely be closed as invalid. Moving to 2.8 since a solution most likely won't be committed to 2.7 without a patch.

comment:2 @gmcosta6 years ago

"sounds more like a support question".
Thanks, but I don't need to come here to ask for support, I just posted to see if someone else has the problem.

"Tickets do not ask questions"
I just asked to know if I was clear enough to anyone understand what was happening.

"what your problem is nor enough information on a solution for the problem."
My problem is that I don't use "index.php" file on my theme, I use "home.php".
If anyone here, delete "index.php" and use the "home.php" in place of index.php, you'll se that wordpress will not show the Page Template Box, on Write Page Panel, that let's you choose a template for a page, just because you deleted index.php

A solution for this is to put a index.php (it could be empty) in your theme, this way wordpress will show again the Page Template Box, in write page panel.

Sorry for anything, I'm not here to ask for support.
and sorry too, for not having a patch to suggest to you.

comment:3 @jacobsantos6 years ago

  • Keywords reporter-feedback removed
  • Milestone 2.8 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Themes require two things, style.css and index.php. If the theme is a child theme then it only requires the style.css file. If you don't have the index.php, then your theme is broken it won't validate.

Note: See TracTickets for help on using tickets.