• Hello

    I did a plain page template for a lightbox gravityForm but i don’t want the adminbar in this template file…

    I tried that add on in function.php (theme)

    function hide_admin_bar() {
    	if (is_page_template() == 'template-form-lightbox.php') {
    		return false;
    	}
    }
    add_filter( 'show_admin_bar', 'hide_admin_bar' );

    But doesn’t work…

    Any idea ?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter popsantiago

    (@popsantiago)

    Hello,
    Any idea ?
    Thanks

    well for starters, the function is_page_template should be called the following way when checking for specific page templates:

    if (is_page_template(‘template-form-lightbox.php’)) {

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide AdminBar for specific template page’ is closed to new replies.