• I created a new template: store.php, which includes:

    <?php
    /*
    Template Name: Store
    */
    ?>

    as the first 5 lines.

    When I go to edit this using the Theme Editor, or apply it in the Write Page section, it does not display. In fact, U get no drop-down listing template pages in the Write Pages page at all.

    What am I doing wrong?

Viewing 7 replies - 1 through 7 (of 7 total)
  • I think you need two files, index.php and style.css as a minimum to get the template to show up in the template selector.

    To confirm, check the bottom of the main template selector page. It should list broken templates there.

    Unfortunately, illovich, that’s not correct!
    The 2 files part is OK, but what you need is:
    page.php – the default Page template in a theme, PLUS
    another Page template (in this case shop.php)
    If you have both, the dropdown will display!

    o-rly…..

    Wiat, maybe you can answer a problem I’m having then– I created a template illovich, which I put in a directory /wp-content/themes/illovich/.

    The template has two files, index.php and style.css (which I named following the directions at http://codex.wordpress.org/Theme_Development#Theme_Template_Files )

    The css file begins:

    /*
    Theme Name: illovich
    Theme URI: http://www.illovich.com/wp/wp-content/themes/illovich/
    Description: This design is for illovich.com. If you like it enough to nick it, let me know =P
    Author: illovich a.k.a. p-marx hanley
    Author URI: http://www.illovich.com/
    Version: 0.1
    */

    The theme is working as the theme of my WP site. I’ve been working on it a lot and haven’t run into any problems… except that it doesn’t show up in the theme selector on the main selector page, so if I ever change the theme I wouldn’t be able to get it back.

    I had a thread about it ( http://wordpress.org/support/topic/93975 ) and although some people have offered good advice, nothing seems to fix the problem.

    But you guys seem to be talking about stuff I hadn’t seen before, so maybe I missed something obvious?

    1. No, you did not create a “template”. Acording to your description you created a theme. If you want to build themes… learn the terminology. Otherwise we can’t communicate.

    2. You are the 0.01% who makes themes with only one template file. The whole idea is about the options: being able to have very different templates for different functions. The complex theme system was born by “slicing” the original index file in several pieces:
    see it here
    3. For your other question: try to add to the stylesheet the “template name” = illovich.

    I’ve created a theme or two; essentially, I made a copy of the default folder (in /themes), renamed the folder to something logical, then designed the theme using those copied files.

    WordPress appears to take a theme’s “name” from the stylesheet in the theme folder, style.css (illovich posted a filled out version above). However, if you want to see the small screenshot of the theme in the WP theme section, you need to add that image to the folder. As the default WP screenshot thumbnail was named “screenshot.png”, I just created a .png file from a screenshot and uploaded it. Works just fine.

    Granted, not everyone could do all this; then again, that’s how it is with most things.

    1. No, you did not create a “template”. Acording to your description you created a theme. If you want to build themes… learn the terminology. Otherwise we can’t communicate.

    Wow, sorry. I guess what I wrote was so unclear that it merited that kind of response.

    You are the 0.01% who makes themes with only one template file.

    I realize now that I was responding to a question with the wrong information (I was interchanging theme and template, a mistake you can be sure I won’t make again).

    What’s annoying to me is that it was easy for you to notice my ignorance, but not not so easy to notice that it was a lack of experience that caused me to speak wrongly, and you decided it was better to marginalize me and talk to me like I’m a child instead of just say something like “hey, I think you’ve made a mistake about what he’s asking for help with” or something.

    Tip for you as a community worker: Berating people who are trying to help other people (even if they’re not as helpful as they think they are) is an awesome way to help your community degenerate into a consortium of internet know-it-all jerks.

    Cheers.

    What’s annoying to me is…

    – people giving me advice how to answer their questions
    [your first and wrong reply to the OP I handled very mildly, according to my norms]
    – people hijacking other users’s topics with totally unrelated posts
    [you deserved a “Don’t hijack; go open your own topic” kind of reply; instead you got some explanation and a request for using the accepted terminology]
    – people not being able to read
    [the answer I gave you to your well-intented but incorrect reply is not related in any way to the answer you got for your hijacking question]

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Templates Don’t Show Up in Theme Editor’ is closed to new replies.