The MU forums have moved to WordPress.org

Template problem (17 posts)

  1. Novocain
    Member
    Posted 16 years ago #

    hi im trying to make my own page (hardcoding) a page called statistik.php (and i put the comment in top of that page, included the example to make an archive list below my comment, made sure all the headers are there.)
    i put it in my home folder, according to the "snarfer method" as seen on this page : http://codex.wordpress.org/Pages (a bit further down on the page)
    i expekted that this would bring up a new option in the dropdown menu in write->page/page template named statistik, altough it didnt. did i do anything wrong? or did i miss something?

  2. lunabyte
    Member
    Posted 16 years ago #

    Did you put:

    
    /*
        Template Name: Name
    */

    at the top?

    That would be the only thing I can think of, unless there might be a parse error or something, that would cause it not to show in the list.

    Other than that, it should work fine. I do it all the time.

  3. Novocain
    Member
    Posted 16 years ago #

    yeah, my file looks like this...

    <?php
    /*
    Template Name: Archives with Content
    */
    ?>

    <?php get_header(); ?>

    <div id="content" class="widecolumn">

    <?php if (have_posts()) : while (have_posts()) : the_post();?>
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>"><?php the_title();?></h2>
    <div class="entrytext">
    <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

    </div>
    <div id="main">

    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    <h2>Archives by Month:</h2>

      <?php wp_get_archives('type=monthly'); ?>

    <h2>Archives by Subject:</h2>

      <?php wp_list_cats(); ?>

    </div>
    <?php get_footer(); ?>

    this code is copyed in its whole from the codex example.
    This file is named arc-cont.php and is currently places in /themes/home

    : Now i figguerd i should get "Archives with Content" in the dropdown list? altough the only thing i can see in the dropdown list is: Default template, and "links"

  4. drmike
    Member
    Posted 16 years ago #

    You didn't put this in while logged in, did you? Log out and relog back in. I only think it polls the files once.

  5. Novocain
    Member
    Posted 16 years ago #

    dang, you gave me a second of hope there, altough no change after signing out/in again, also cleared my cache from the browser..

    any toughts?

  6. lunabyte
    Member
    Posted 16 years ago #

    Nope. I can't reproduce it, so I'm of no help.

  7. Novocain
    Member
    Posted 16 years ago #

    how would i go about to reinstall my wpmu folder, without needing to reinstall the database, so in other words, what files do i need to keep for my newly installed folder to not offer the "install" screen when i run the site for the first time?

  8. Novocain
    Member
    Posted 16 years ago #

    I fixed the problem with a new install, altough now when im trying to make it work again, i discoverd that some themes react diffrently to the "home" folder. for example, im trying to run the "drop shadow" theme on my page, http://www.bloggproffs.se (altough this page dosent handle my custom templates at all, it can be seen on bloggproffs.se/arkiv (swedish) as you can see, the "arkiv" is empty, but if i install the standard wp-mu theme it works like a charm, is there anything i can do to make my selected theme read my custom templates?

  9. nedsferatu
    Member
    Posted 15 years ago #

    I am having this issue was well. When i go to write a new page in my first blog I see three templates (including one that doesn't exist anymore), and when i go to write a new page in any of my other blogs I see no list of templates at all. Where else is this being stored? is there a db table that I can clean? thanks!

  10. cafespain
    Member
    Posted 15 years ago #

    What is the name of your php page?
    Could it be something to do with this?
    http://mu.wordpress.org/forums/topic.php?id=8028&page=2#post-47613

  11. nedsferatu
    Member
    Posted 15 years ago #

    cafespain, good idea and thanks for helping me troubleshoot. I went through and changed all the names to be identical. I logged out of wp-admin and logged in again and saw the same behavior.

  12. andrea_r
    Moderator
    Posted 15 years ago #

    "When i go to write a new page in my first blog I see three templates (including one that doesn't exist anymore), and when i go to write a new page in any of my other blogs I see no list of templates at all."

    I'm actually having trouble figuring out what you mean. Do you mean PAGE templates? And are the blogs using the same theme?

  13. nedsferatu
    Member
    Posted 15 years ago #

    Andrea, sorry yes I mean page templates. All blogs are using the same theme which is a customized version of sandbox 1.5.2.

    So when I go to write a page on blog_id 1, I see a dropdown list of page templates that is incorrect. When i go to write a page on all other blogs I see no page template dropdown.

    I'm wondering if the script that creates that list is stuck on some obsolete data and if there is a table in the db i can clean out so that it can build that list from scratch. or am I off in the weeds? I don't have a good understanding of how it builds the page templates list i guess.

  14. andrea_r
    Moderator
    Posted 15 years ago #

    Yeah... that is odd.

    Basically, if there's a page template and the correct stuff is at the top, so *one* blog can find it, all of them should.

    As for a table in the db, you'd have to look in each blog's options tables. It doesn't store a list of page templates tho, not as far as i know. just read 'em from the directory.

    Sandbox has been picky with MU in the past - is that a recent version?

  15. nedsferatu
    Member
    Posted 15 years ago #

    Thanks Andrea!

    Yes the version of sandbox is the most recent.

    An interesting thing i just observed was when i just added a new blog, the templates work fine for it. Still seeing the same behavior in the older ones.

    I took a tour around the options table but didn't see anything promising. I think i'll look around the admin section files to see what i can find.

    almost seems like the list was updated once when the blog was made but not again. after that.

    thanks for all the help troubleshooting so far!

  16. nedsferatu
    Member
    Posted 15 years ago #

    I fixed it: i allowed another theme in the admin settings, switched between the two themes and now all the templates show up. Switching the templates and then switching back solved the issue. that's all the over thinking I want to do for now. hopefully this will help someone avoid it too. Thanks everyone

  17. wildebees
    Member
    Posted 15 years ago #

    Great, I had a similar problem and switching themes and back helped for me as well.

About this Topic

  • Started 16 years ago by Novocain
  • Latest reply from wildebees