Change X Theme Footer Widget Output

We’ve set the footer to contain 4 x widgets, and they’re ouputting as x-md blocks:

We’d like them to be x-sm blocks so they break at 767px, not 979px.

Please can you point me in the direction to change this.

Thanks,

Steven

Hi Steven,

You may override the footer template file that displays the widget using a child theme.

Once you have the child theme activated, login through FTP and create a _footer-widget-areas.php file in wp-content/themes/x-child/framework/legacy/cranium/footers/views/global.

Edit the file and add the code below to the file:

<?php

// =============================================================================
// VIEWS/GLOBAL/_FOOTER-WIDGET-AREAS.PHP
// -----------------------------------------------------------------------------
// Outputs the widget areas for the footer.
// =============================================================================

$n = x_get_option( 'x_footer_widget_areas' );

?>

<?php if ( $n != 0 ) : ?>

  <footer class="x-colophon top">
    <div class="x-container max width">

      <?php

      $i = 0; while ( $i < $n ) : $i++;

        $last = ( $i == $n ) ? ' last' : '';

        echo '<div class="x-column x-sm x-1-' . $n . $last . '">';
          dynamic_sidebar( 'footer-' . $i );
        echo '</div>';

      endwhile;

      ?>

    </div>
  </footer>

<?php endif; ?>

Basically, the code above changes the line:

echo '<div class="x-column x-md x-1-' . $n . $last . '">';

to

echo '<div class="x-column x-sm x-1-' . $n . $last . '">';

Hope this helps.

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