Footer Global Block

Hi there,
Following up from our last thread here : https://theme.co/apex/forum/t/top-bar-alignment/50188/18

I would like to make my footer into a global block like my top bar. Can you advise me on what folder I need to create and add?

Hi There,

Thank you for creating a new thread. Do the same method I provided on that other thread. But instead of editing the _topbar.php file, edit the wp-footer.php file, that you can find in \framework\legacy\cranium\footers\views\ethos directory.

Make sure you copied that file on your child theme (same directory) and do your modification in there.

<?php

// =============================================================================
// VIEWS/ETHOS/WP-FOOTER.PHP
// -----------------------------------------------------------------------------
// Footer output for Ethos.
// =============================================================================

?>

  <?php x_get_view( 'global', '_footer', 'widget-areas' ); ?>

  <?php if ( x_get_option( 'x_footer_bottom_display' ) == '1' ) : ?>

    <footer class="x-colophon bottom" role="contentinfo">
     <?php echo do_shortcode( 'YOUR GLOBAL BLOCK SHORTCODE HERE' ); ?>
    </footer>

  <?php endif; ?>

<?php x_get_view( 'global', '_footer' ); ?>

Please be reminded that this is now in the realm of customization, further customization from here or any conflicts that may arise from this won’t be supported.

Cheers,

I understand. I edited my file using this short code [cs_gb id=1611] but it is not working. I copied the text exactly how it is displayed.

Can you look into this?

Hello @quituck,

It does not work because you have added the file in the wrong directory. You are supposed to place the file in \framework\legacy\cranium\footers\views\ethos.

At the moment, you place it in \framework\legacy\cranium\footers\views\ only.

Regards.

Thank you! I was able to get it to display. I just have one more problem this is an extra space above the footer. How to I remove it? See image attached.

I tried changing the color of the extra space to black, in attempt to hide it but it did look quite right. It added an extra black border to my bottom blue section with my copyright info.

I used the following code and changed the color to black:

  .x-topbar, .x-colophon.bottom {
       background-color: rgb(21,101,192);
}

Can you tell me what I need to do to fix that?

Thanks in advance.

Hi @quituck,

That’s the default top and bottom padding of the footer, let’s remove that by adding the following CSS code to Theme Options > CSS

footer.x-colophon.bottom {
    padding-top: 0;
    padding-bottom: 0;
}

Now if you need padding or margin on the footer, please control it from your section (in Global Block).

Cheers!

Everything works perfectly.

Thank you so much!

You’re most welcome!

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