Homepage Custom Template Thesis WP


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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');

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.