Support » Requests and Feedback » A question… Post table & page template

  • Hi =O)

    have been working in word press for about 6 months and I am just curious. Why is the data for the post or page template stored in a different table then wp_posts? Why not just create an extra column called template? and then store “index.php”, “single.php”, “archive.php”?

    Doing so would then allow you to version templates with the pages and advanced users can write quires that retrieve posts specific to a particular template with few sql statements?

    Thanks! =O)

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi

    (@esmi)

    Forum Moderator

    Post archives use a strict hierarchy to determine what template file to use. Only Pages use custom templates.

    Hi esmi…

    Thanks for the reply… can you clarify what you mean by “strict hierarchy to determine what template file to use”? Are you referring to posts using the “comments.php” and other theme files that relate to threads?

    If so this brings up another question… why make those theme template files? Why not make the PHP class therefore one could just reference them from a library and then instantiate the class when needed… sort of like code ignitor?

    Thanks! =O)

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    thanks… I guess the template hierarchy is so themes can handle one off pages or pages that are slightly unique in behavior…

    That is kind of a bummer… =T in future versions i was hoping it would evolve so plug panels could load based on the selected template…

    I find my authors get over very whelmed by all the custom fields and plug panels… It would be great if I could just reference the theme file name in the default loop data… therefore I can show the panels that are important to that theme template…

    esmi

    (@esmi)

    Forum Moderator

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘A question… Post table & page template’ is closed to new replies.