In this video, I will show you how to create a custom page template using Thesis. In theory, this could be used on any page; I just happen to do the home page in this example. Many people have asked me how to move their blog to a different part of their site and create a custom home page or landing page (in sales). This technique is very useful for those of you who have a product you want to sell and would like your website visitors to see the product as soon as they come to your site.
Here is the PHP I used in this tutorial:
remove_action('thesis_hook_custom_template','thesis_custom_template_sample');
function sales_page() {
?>
Your custom HTML here.
<?php
}
add_action('thesis_hook_custom_template','sales_page');
Feel free to name your function anything you would like. Since this video is from a request for a guy who is trying to make a sales landing page, I just happen to name my function sales_page.
Make sure to give your page a unique custom class via the Thesis in-page options!
Also, don’t forget to either upgrade or Get Your Thesis Developer’s Package!
Please send all questions to ThesisTutor [at] gmail [dot] com!

{ 1 trackback }
{ 15 comments… read them below or add one }
Great tutorial!
One thing i missing is how you can merg the content with the sidebars, so you have one contentfield on the whole page.
Thx
And keep up the good work!
If you want that “effect” on every page, just set your layout to “one column.” The sidebars will appear below, much like my site.
NOW i finally understand the custom templates.
Now here is my question..
If I wanted to have multiple templates do i still need to do the remove action at the beginning of each function for each custom template?
Matt – how could widgetized sidebars with different content than the default sidebars be implemented into custom page templates? I want a template for all non blog pages containing alternate sidebar content, most likely without any blog related widgets. Could the divs you setup in the template tutorial above be widgetized, or would I have to just code all the content into the functions.php file?
@Chris
That is highly customized work you are asking for. Please email me and we can discuss how I can help you.
Thanks.
Matt – thank you for these tutorials. I haven’t purchased Thesis yet. But will do so through your affiliate link. You’ve done more to answer my questions than anyone. Thanks.
Here’s a question: In the video above, you pasted the divs and text into the custom_functions.php . Was this to demonstrate that you can put “whatever you want” in the custom page?
Why wouldn’t you create a custom template called “sweet sales page” then create a page in WP (assigning it to that CSS class) and then enter the div tags in the actual page as content?
I’m not sure if you’re suggesting the idea of putting actual content in the custom_functions.php file. Or if that was just a quick way to demo the concept.
Thanks again.
Emile.
PS: regarding Chris’ question. There is a plugin called Widget Logic that will enable you to set widgets to ONLY appear on specific pages, categories, posts, etc. It’s brilliant.
Nice tutorial Matt.
I’m trying to make some hidden pages so I can still use WP comments but I think custom templates is the way to go.
Sweet Tutorial! But what if instead of a fully new template, I want to access the Thesis default template, and then just tweak it a bit. For instance, on the Thesis home page it shows featured posts and excerpts of posts. I want to keep that functionality, but I want to only show 3 posts on the home page, and then add my own content below that. I am confused as to how to make that happen. Any ideas? Thanks!
@Jason
From the Wordpress Dashboard go to Settings->Reading then set the number of posts you want to display on the blog page. To add your own content simply use the appropriate hook (i.e. thesis_hook_after_content or thesis_hook_after_content_box) and hook into place your HTML/PHP.
Oh… really? That easy, huh? Thanks a lot! You may have just saved me a lot of time and anguish! Thanks!
Hi Matt,
Thanks for a great tutorial! It’s amazing how easy things become when they are explained step by step.
Melissa
Matt,
I want a custom page that has different content in the side bars. Kind of like having side bars 3 and 4. Do you have a turorial for that?
Mary Ann
Thanks a million… Great tutorial… Clear & Clean
Great tutorial – Thank you.
But… I have a question.
Using this method to customize a page is great but once you hand it over to your client, it seems that the client will no longer be able to manage the content using the admin.
Am I correct or is there a way to customize a page while keeping the WISIWG editorial functionality?
Thanks
@vincent
This is not a technique that is intended to be used as you have described. It is strictly for pages that either do not require updates or that are updated by proficient users with server side access. If you are looking to make a more ‘custom’ page that can be updated easily, I recommend using the ‘no sidebars’ template and making a design within a Wordpress page.