Support » Fixing WordPress » Help with custom page templates

  • New to WordPress, so bear with me. Trying to set a site up using WordPress more of a CMS. Everything on the site I am adding as a Page, and pasting HTML directly in to the editor.

    One section of my site is going to list biographies of people, and my client is going to be editing this regularly, so I want to it up as easy as possible to edit.

    Can I set a page parent up so that when you try to create a child page it will automatically show a set number of fields (e.g. Name, Age, Profile, Image, Position) instead of one large WYSIWYG editor?

    Thanks for the help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • First, putting the html directly into the Page content area is not a great idea, especially if a client is going to edit that at any time. That html can go right into the page template, which is conveniently called “Page Template” in the theme editor.

    Second, yes, you can set up a Page parent like you ask. For this approach, you could make a custom page template for the children — BUT your client would have to remember to check off the correct page template choice. Then on that template you would call in the custom fields.

    The fields could be managed with generic custom fields, but I think that’s confusing. A better option would be to install a plugin that manages that. There are lots out there with different options, and you can tell it whether or not to display the editor (the big area with wysiwyg).

    It can be scary editing template files at first, but it gets easier. Look at some videos, check out starter info on other websites (not the codex here). The best thing I learned was to first copy all the code from the template file and paste into a text file (not Word), then make my changes. If the page breaks you can always reload the first code. And be patient, the learning curve takes a little time.

    You might also consider making the biographies a category with posts. Then the posts in that category could be listed on the appropriate page. You would need to set up a custom template for those posts (including the code for custom fields) then edit the Page Template to get those. This would be an if/else statement: if is_page (‘where-a-list-of-bios-would-go-page-title’) show the list of posts in the category of biographies, else get on with the default page styling.

    Thanks for the help.
    Do you have a recommendation for a plug to manage what shows up on the edit screen of a specific template type? You approach sound perfect.

    This one is super simple:

    And this one is more configurable, but a little more confusing at first (I use it now and love it though):

    I haven’t used this one but it seems popular:

    There are lots of choices. Remember to put the appropriate code in the template to display the values. Have fun!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help with custom page templates’ is closed to new replies.