Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter to themer to disable header #374

Open
FelixVicis opened this issue Jul 10, 2024 · 1 comment
Open

Add filter to themer to disable header #374

FelixVicis opened this issue Jul 10, 2024 · 1 comment

Comments

@FelixVicis
Copy link

Is your feature request related to a problem? Please describe.

I recently had an issue where I was trying to make a variant on the theme template No Header/Footer for specifically a No Header template in a page where I wanted custom navigation. I had copied the template over and changed the filters to show only the footer but my header was still there.

I realized that it was the themer header displaying and needed to disable the theme header for that page.

Describe the solution you'd like

I'd like for an update to /bb-theme-builder/extensions/themes/classes/class-fl-theme-builder-support-bb-theme.php to add a filter like

$show_themer_header = apply_filters('fl_themer_header_enabled', true);

where the themer header can be disabled without having to add an exception to each page.

Describe alternatives you've considered

As said above, an easy UI solution is to add the page as an exception. Another alternative that I'm using in the meantime is to add the following line to my template so that it's more themer aware:

remove_action( 'fl_before_header', 'FLThemeBuilderLayoutRenderer::render_header', 999 );

Additional context

For anyone else looking for a BB No Header template for use with themer I've added my code below

<?php
/*
Template Name: No Header
Template Post Type: post, page
*/

add_filter( 'fl_topbar_enabled', '__return_false' );
add_filter( 'fl_fixed_header_enabled', '__return_false' );
add_filter( 'fl_header_enabled', '__return_false' );
remove_action( 'fl_before_header', 'FLThemeBuilderLayoutRenderer::render_header', 999 );
add_filter( 'fl_footer_enabled', '__return_true' );
get_header();

?>
<div class="fl-content-full container">
	<div class="row">
		<div class="fl-content col-md-12">
			<?php
			if ( have_posts() ) :
				while ( have_posts() ) :
					the_post();
					get_template_part( 'content', 'page' );
				endwhile;
			endif;
			?>
		</div>
	</div>
</div>

<?php get_footer(); ?>
@codente
Copy link
Contributor

codente commented Aug 22, 2024

We will look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Under Consideration
Development

No branches or pull requests

2 participants