Site logo

Archived topic

How can I use a custom bb footer though out? Such as on single post pages?

7 replies · Started by Derek on May 27, 2018

Viewing posts 1–8 of 8

Hi,

As of right now I'm disabling the footer via "disable elements," and setting my custom footer via beaver builder for each new page, but I noticed you can't load single post pages from your blog up in beaver builder so my posts have no footer. Does generate press have a way around this?

The only way I can think of on the top of my head would be to use a pages are posts plugin.

Thanks again.

Thank you Leo, but its not the widgets I'm referring too its the footer menu. Maybe its the same process just a different hook location? wp-footer? I couldn't find any option in the customizer to disable the footer menu globally, so thats why I was doing it individually for each page via disable elements.

Honestly I don't know what I'm supposed to enter into this <Insert your hook contents in here> field anyway, the name of the custom bb footer widget or something?

To remove the copyright area globally? Then you can try this PHP snippet:

add_action( 'after_setup_theme','tu_remove_footer' );
function tu_remove_footer() {
    remove_action( 'generate_footer','generate_construct_footer' );
}

Adding PHP: https://docs.generatepress.com/article/adding-php/

The <Insert your hook contents in here> part will take any HTML like shortcodes etc.

The generate_after_footer_widgets should work. Did you try it?

Ok so here is my attempt at combining what you told me and what I read online...ofcourse it's not working I'm sure I'm way off here hahahahah!

add_action( 'after_footer_widgets','bb_footer' );  
function example_function_name() { ?> 
    echo do_shortcode('[fl_builder_insert_layout slug="footer-menu"]');
<?php }

Here is what I found on bb:

// Add your Beaver Builder Saved Rows to the bottom of your website
add_action('fl_after_content', 'odw_do_footer_rows');
function odw_do_footer_rows(){
	if(!is_front_page()):
		echo do_shortcode('[fl_builder_insert_layout slug="footer-widgets"]');
		echo do_shortcode('[fl_builder_insert_layout slug="footer"]');
	endif;
}

Suggestions?

Thank you!

Hi Derek,

If you want the template across the entire site then you can just use Appearance > GP Hooks and add your shortcode to the After Footer Widgets Hook

LOL that worked David. I honestly didn't think it would have been that easy :P

Glad to be of help.

This archived topic is closed to new replies.