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

Home Forums Support [Resolved] How can I use a custom bb footer though out? Such as on single post pages?

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #585965
    Derek

    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.

    GeneratePress 2.1.2
    #586381
    Leo
    Staff
    Customer Support

    Hi there,

    If you want to disable the footer widgets globally then you can use the customizer option:
    https://docs.generatepress.com/article/footer-widgets/

    Then try adding the BB content via generate_after_footer_widgets hook:
    https://docs.generatepress.com/article/hooks-overview/

    With conditional tags:
    https://docs.generatepress.com/article/using-hooks-conditional-tags/#single-posts

    #586649
    Derek

    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?

    #586714
    Leo
    Staff
    Customer Support

    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?

    #586862
    Derek

    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!

    #586976
    David
    Staff
    Customer Support

    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

    #587590
    Derek

    LOL that worked David. I honestly didn’t think it would have been that easy 😛

    #587674
    David
    Staff
    Customer Support
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.