Return to Snippet

Revision: 42340
at March 3, 2011 14:20 by zachbrowne


Initial Code
function custom_remove_defaults($content) {
        return false;
}

function apply_custom_filters() {
    if (is_page('Squeeze Page')) {
		add_filter('thesis_show_header', 'custom_remove_defaults');
		add_filter('thesis_show_sidebars', 'custom_remove_defaults');
		add_filter('thesis_show_footer', 'custom_remove_defaults');
	}
}
add_action('template_redirect','apply_custom_filters');

Initial URL

                                

Initial Description
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.

Initial Title
Add Squeeze Page to Thesis Theme for WordPress With Custom Filter for Thesis 1.8

Initial Tags
php, wordpress

Initial Language
CSS