Different footer on different pages

My footer is different on some pages. How can I fix that?

Hello Alexander,

Thanks for writing in! When using X theme, the footer should always be the same across all pages. A different footer content may only happen if you have created a custom sidebar in Appearance > Sidebars and assigned the sidebar to appear in the footer for some specific pages.

Hope this helps.

Hi RueNel,

I haven’t created a custom sidebars. And there are no sidebars at ll.

EDIT: OK, figured it out. It is just a content area that was called footer; can I apply this to all pages?

Hello Alexander,

A content area element can only be added on a page by page basis. You cannot apply it in all your pages. Unless otherwise you are using Pro theme, then you can easily create a custom footer and apply it to specific page/s in your site.

I am not sure by the way how your footers look like. If only I can view your site and have the idea of what you want to do with your footer.

Regards.

The “footer” = content area, dark brown box plus the green, I would like to apply it as it is as the footer area to all pages.

Hi Alexander,

  • You can achieve that by using the Global Block shortcode:
  • First, please setup a child theme:
  • After that add this custom code under functions.php file locates in your child theme:
function x_print_global_block(){
	echo do_shortcode( '[your-global-block]' );
}
add_action( 'x_before_view_footer_base', 'x_print_global_block' );

Hope that helps and thank you for understanding.

Ok, thanks for this but now all it says [your-global-block]?

I have created a global block as you said but what now?

Hello Alexander,

You did not place the correct global block shortcode.

function x_print_global_block(){
	echo do_shortcode( '[your-global-block]' );
}
add_action( 'x_before_view_footer_base', 'x_print_global_block' );

[your-global-block] must be replace with the correct shortcode with something like this [cs_gb id=123] where 123 is the ID of the global block.

Hope this helps.

Cheers for the fast reply - love it!

This works great!

Just to clarify am I editing the child theme now and leave the parent theme alone? How can I revert changes - re-apply the parent theme to the child theme minus a few changes I would like to keep?

Hello Alexander,

When you activate the child theme, all the theme option settings will be applied to the child theme as well. Any modifications which you have added in your parent theme’s functions.php file should be remove and relocated to the child theme’s functions.php file instead.

Hope this helps.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.