Posted By

mlangfeld on 06/22/09


Tagged

wordpress thesiswp homepagecustomtemplate


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

tmbrenneke
joelhaus
naeemnur


Homepage Custom Template Thesis WP


 / Published in: PHP
 

URL: http://www.berchman.com/thesis-tutorial-multiple-custom-page-templates/#primer

In this Thesis WP tutorial for multiple custom page templates, we find code for making a custom homepage template as well.

  1. /* HOME PAGE CUSTOM TEMPLATE */
  2.  
  3. function home_pagecustom() {
  4. /* check to see if homepage. has to happen inside the function */
  5. if (is_home() || is_front_page()) {
  6. ?>
  7. ...Your custom layout goes here...
  8. <?php } }
  9.  
  10. /* Now we tell Thesis to use the home page custom template */
  11.  
  12. remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample');
  13. add_action('thesis_hook_custom_template', 'home_pagecustom');

Report this snippet  

You need to login to post a comment.