I’ll post the link below (as the site is in development) - but I have created my own header/footer using the BB plugin - but I am totally stuck at how I apply these /create to the header/footer of the blog. I am not using the customiser as it doesn’t let me set a header with 3 columns or a footer with 3 columns. These work perfectly on all my pages - its just my blog page I am stuck as to how to this in (have looked at the knowledge base - but apologies if I have missed this)
Doh! forgot I have this set to being under maintenance
so the site/url is useless to view right now as you can’t see anything!.
I can provide a login or screen grabs to help - but all my pages are spot on - its just my blog pages simply has posts stacked up - I need to add a header/footer on to this page.
I’ll give that a shot this afternoon - thank you! (and sorry for not finding that when I searched!!) - just a daft question - but I have added this already to most of the pages by just using the page builder and my own created layouts - this won;t ovewrite these or cause a double header/footer to appear will it? (kinda daft as I’ll soon find out when I try).
Again just to say thanks - beaverbuilder is brilliant and if you ever need any beta testers give me a shout!
// Adds my global header module my header
add_action(‘fl_before_header’, ‘my_global_header’);
function my_global_header(){
echo do_shortcode(’[fl_builder_insert_layout slug=“global-header-page”]’);
};
// Add global footer to footer
add_action(‘fl_after_content’, ‘my_global_footer’);
function my_global_footer(){
echo do_shortcode(’[fl_builder_insert_layout slug=“my_global_footer”]’);
};
But no header or footer is showing up on my blog page or on any of the posts (blog is the page that shows all my posts)
I am obviously missing something obvious!!
These are just the last issue to complete this site change
The issue I believe is caused by you not using the correct slug in both hooks. For example, you have this:
// Adds my global header module my header
add_action('fl_before_header', 'my_global_header');
function my_global_header(){
echo do_shortcode('[fl_builder_insert_layout slug="global-header-page"]');
};
// Add my global footer to my footer
add_action('fl_after_content', 'my_global_footer');
function my_global_footer(){
echo do_shortcode('[fl_builder_insert_layout slug="global-header-page"]');
};
However, none of your global rows i.e. header or footer have those slugs (global-header-page). If you replace the code using the following, it should resolve your issue.
// Adds my global header module my header
add_action('fl_before_header', 'my_global_header');
function my_global_header(){
echo do_shortcode('[fl_builder_insert_layout slug="header-2"]');
};
// Add my global footer to my footer
add_action('fl_after_content', 'my_global_footer');
function my_global_footer(){
echo do_shortcode('[fl_builder_insert_layout slug="footer"]');
};
To find the correct slugs for your saved rows, modules. Visit your WordPress Admin Dashboard > Templates and click the Quick Edit link beneath your saved row/module. In the slug option that is the name you need to use.
doh! - I can see exactly where I went wrong - the only problem is that I now have a double header & footer appearing on all my normal pages - I just need the header & footer to be added to my posts.
Any ideas?
I’ll go do a bit of googling/wordpress searching to see if I can find what to add so this just appears on my posts (as I have a page layout I created that I added for all my pages)
Thanks again for helping with me with teh super obvious - just need the pages not to have a double header and my blog posts to have a header/footer