WordPress.org

Forums

Need help with page templates (7 posts)

  1. sharf
    Member
    Posted 2 years ago #

    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.

  2. Andrew
    Forum moderator
    Posted 2 years ago #

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

  3. sharf
    Member
    Posted 2 years ago #

    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.

  4. Andrew
    Forum moderator
    Posted 2 years ago #

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

  5. sharf
    Member
    Posted 2 years ago #

    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?

  6. WPyogi
    Forum Moderator
    Posted 2 years ago #

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

    http://codex.wordpress.org/Theme_Development

  7. sharf
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.