Posted By

zachbrowne on 03/03/11


Tagged

php wordpress thesis


Versions (?)

Add Multiple Squeeze Pages to Thesis Theme for WordPress With Custom Filter for Thesis 1.8


 / Published in: PHP
 

To get the simplest squeeze page possible: no header, sidebars or footer. Paste the following PHP in custom_functions.php. The first function is the filter that returns “false” instead of returning the content that would normal be there (in the header, or footer, or sidebar). The second function selects the page on which to apply the filter and then applies the filter to the header, sidebars and footer, just before Thesis loads on that page.

  1. function custom_remove_defaults($content) {
  2. return false;
  3. }
  4.  
  5. function apply_custom_filters() {
  6. if (is_page(array('Squeeze Page','Second Squeeze Page,'Magical Landing Page'))) {
  7. add_filter('thesis_show_header', 'custom_remove_defaults');
  8. add_filter('thesis_show_sidebars', 'custom_remove_defaults');
  9. add_filter('thesis_show_footer', 'custom_remove_defaults');
  10. }
  11. }
  12. add_action('template_redirect','apply_custom_filters');

Report this snippet  

You need to login to post a comment.