Footer in child theme

Hi, I’m trying to use a new footer in my child theme, but when I replicate the base.php file inside views/footer the footer disappear from website.

In the past I ussually replicate _footer.php file inside legacy/cranium/footers/views/global, but now I have tried to use that file without success: the modifications I have made inside it doesn’t take any effect.

My needs is to put a js script just before body closing tag. The script itself works perfectly and it isn’t the responsible of footer disappearance.

Can you help me to understand this issue? Thanks very much

Hi Alessandro,

If you just want to integrate a JavaScript into your footer, you can add the following example code into your child theme’s functions.php file and change it accordingly.

add_action( 'wp_footer', 'my_custom_js', 10 );

function my_custom_js(){
    echo '
      <script type="text/javascript" src="//link.to/your/javascript.js"></script>
    ';
}

Hope that helps.

Thank you, it works fine!

But if I would like to customize my footer, what file do I have to use without running into an issue?

Thanks

Hello Alessandro,

Thanks for updating the thread. :slight_smile:

If you would like to edit the section where widget area is present then please take a look at _footer-widget-areas.php under /wp-content/themes/x/framework/legacy/cranium/footers/views/global/.

Regarding the area where social icons are present in footer please take a look at wp-footer.php under /wp-content/themes/x/framework/legacy/cranium/footers/views/integrity/.

Thanks.

Ok, thank you very much.

Glad we could help.

Cheers!

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