WordPress.org

Support

Support » Themes and Templates » Need help with page templates

Need help with page templates

  • Hi all, I’ve been making a WordPress theme quite successfully. I have recently hit a snag however. I need to make the page.php file, and I’m not finding much help anywhere explaining what I need. I suppose my biggest issue is figuring out what I need to put to get what ever information is supposed to be put on the page.

    I’m sorry if I’m not making sense. For example, for the posts pages, there are PHP scripts that loop through to display them. But I don’t know what script I need to display the content of the page(s).

    If anyone can give me a little help, or point in the direction of a good guide I’d appreciate it.

    P.S. I found the doc on here that talks about it, but that didn’t really help.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Andrew Nevins

    @anevins

    Forum moderator

    The default Twenty Ten and Twenty Eleven themes’ code should provide guidance with this.

    I looked into that, and when I tried to mimic them, it just caused all of the content to disappear. The header, footer, and sidebar were all in tact, but there was no content. I’m thinking I might be missing some functions.

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    Are you developing locally? If so, you should turn error handling on, so you can determine why your code is breaking.

    I am developing on a local Wamp server, though at the time of this test it was on the live server. I’ll see what is says.

    Edit:
    There is no error displayed or logged. I tried just using the same page.php file from twentyten in my theme, and this is what happens. Any ideas for more error checking?

    WPyogi

    @wpyogi

    Forum Moderator

    Have you reviewed the requirements for a theme in this document?

    http://codex.wordpress.org/Theme_Development

    I had, but it was a while ago. The function reference page looks helpful, but I’m still a bit confused. Why can such a simple page layout display properly in twentyten, but not in mine? I don’t want to over complicate things, which I have a tendency to do with PHP.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Need help with page templates’ is closed to new replies.