Working with Custom Page Templates in WordPress
videos

Working with Custom Page Templates in WordPress

In this talk, Randy Hoyt, a faculty member at the University of Texas at Dallas (UTD), will demonstrate how to take a typical blog structure, and morph it into custom layouts. Along the way, he discusses the inherent differences between posts and pages, how to create custom page templates, how to expedite the process of adding custom fields, and more.

Press the HD button for a clearer picture.

Thanks so much to Randy for contributing this to Nettuts+!

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://laroouse.com esranull

    workingggg! thanks a lot

  • http://gabediaz.com Gabe Diaz

    Does the University of Texas offer courses that touch on WP theme development or was this just a talk for a non-school related presentation? If the former, I have to applaud you and the Uni for the great work in WP teaching…if the later all applause goes to you!

    You can take your customizations further and do custom category and post templates.
    http://gabediaz.com/blog/custom-category-page-and-post-templates-for-wordpress/

    Again, great work Randy!

  • http://Blog.s-basham.com Seth

    Next time try cutting the background noise down.

    Good though.

    • http://www.jeffrey-way.com Jeffrey Way

      Hey – Seth, this was a lecture; so I’m sure it’s difficult to cut out all of the background noise.

    • http://curtismchale.ca curtismchale

      Wow for free content you’re pretty picky.

    • Nick

      Next time, get a better senior portrait for your avatar pic.

      • Brad

        Hilarious!

  • http://ve3gam.webqth.com Al

    gee I wish that that was something I could have studied when I was in university in the long ago past. when I went, we never heard of a computer much less a small one like a pc. my first job with computers was with an IBM model 30 with 32K (yes!) of memory.

    great video, really enjoyed it

    Al

  • arnold

    Thanks for the tut…
    gotta love worpdress

  • http://stevenpiets.com steven pieter

    one of the best video tutorial I’ve ever seen… ;)

  • http://maidulp.wordpress.com maidul

    I love wordpress

  • http://jee.im Sakib

    A brilliant share and really lots of things I have learned from the video tutorials. Thanks Hoyt

  • http://newdailyblog.blogspot.com Tahsin Hasan

    nice article………….

    see more tech articles on tahSin’s gaRage.

  • Nobody

    Excellent video!

  • keitai

    Thanks for the lecture.

    question why use the plugin redirector and page-links-to, aren’t they kind of the same?

    fyi:
    Wordpress plugins used in the lecture
    (pixopoint-menu)
    custom field template
    kb advanced rss widget
    page links to
    redirector
    codecanyon.net/item/reorder-reorder-posts-and-pages/112877

    • http://randyhoyt.com/ Randy Hoyt
      Author

      Redirector only works on Pages, and Page Links To doesn’t have the option to redirect a page to its first child page. It would definitely be nice to have these two functions appear in the same plugin; there’s quite a bit of overlap in these two plugins.

  • http://lesslines.com Ivan Malijkh

    Great video!

    You might also fix the list with sub-pages by adding a second menu as WordPress 3 supports multiple menu’s.

    • http://randyhoyt.com/ Randy Hoyt
      Author

      When deciding to use WordPress menus versus wp_list_pages(), you should think about what you want to happen when a new page is published. Do you want it to show up in the navigation automatically, or do you want only pages you specify to appear in the navigation? With menus, you’d have to add any new pages to the navigation manually. In this particular case, I’d like all the pages to appear automatically; that’s why I use wp_list_pages() in this particular case.

      • http://www.grinshare.com Billy Shaun

        Actually WP Menu’s also give you an option to automatically add any newly created page in the Menu’s.

      • http://randyhoyt.com/ Randy Hoyt
        Author

        @Billy ↓

        WordPress let’s you add new TOP-LEVEL pages to the menu, but I don’t think it let’s you add new second- or third-level pages. That seems to me the main missing feature of the menus right now, and I do hope that add something like that. (If it does do that already, I hope you’ll post a screenshot or link or some brief instructions about how to do it.)

  • http://wordpress-tech.info wordpress Guru

    Thank you!.

    I had some problem with custom fields.

    Now It’s clear for me!

    I would recomend to any newbee!

  • http://evansofts.com evanxg

    Great 1000th post

  • http://tj.abderrahmane.com Abderrahmane TJ

    1000 Posts on nettuts, congratulations : )

  • http://www.darrinhoudek.com kid

    Why cant I download this video when I try all i get is the stinking commercial?

  • http://www.smashblogtips.com fareed khan

    Nice video…thank you for putting this Video

  • John

    Very useful video! Would like to see more like this.

  • http://dereckbester.co.za/ Dereck Bester

    Really usefull!

    Thanks.

    Dereck Bester

  • http://www.bumstaerk.eu Martin Haakansson

    He seems a little out of breath – or just nervous.
    But hey, thanks for sharing :)

  • Randall

    Thanks for the great video. I think the assignments are analogous to a lot of many with a category items. However, I do not understand why you chose pages as opposed to posts.

    Could you have made them posts, ignore the post date, add a due date as meta data, and then have each week automatically include all posts with an applicable due date. You would then also get more easy usage of taxonomies.

    Did you choose pages because they allow children? Is there another reason that I missed that made them the best choice?

    Thanks

    • http://randyhoyt.com/ Randy Hoyt
      Author

      Pages gave me the functionality I needed without too much customization; I was able to work much more closely within WordPress rather than customize around it. Just two examples: I wanted the nested URL structure that the page hierarchy uses by default and I liked the ability to manually control which assignment went in which week. You could certainly achieve the same result with posts, but I think it would have required a lot more custom code.

      One other observation: I have found it just as easy to get taxonomies working with pages as with posts; has your experience been different?

  • http://www.endocreative.com Jeremy Green

    Thank you for posting this video. This made custom fields a lot less confusing for me. And I liked how you formatted them into that table. Very nice.

  • mehedi hasan rahat

    can i download the video??

  • Brad

    Randy,

    Great presentation! Thanks for sharing this with us.

    Brad

  • Bill

    Where’s the source code?

  • http://www.toprankoutsourcing.com Joe Oracoy

    wow! been all over the place and trying to find this. Thank you for sharing. I always wanted to learn about Page Templates in wordpress.

    Regards,
    Joe

  • Elvira Tolen

    Great! Thank you! This is exactly what I was looking for.