Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Dynamic footer columns based on active footer widgets #778

Open
1 task done
Remzi1993 opened this issue May 21, 2024 · 4 comments · May be fixed by #776
Open
1 task done

[Feature Request] Dynamic footer columns based on active footer widgets #778

Remzi1993 opened this issue May 21, 2024 · 4 comments · May be fixed by #776
Labels

Comments

@Remzi1993
Copy link

Remzi1993 commented May 21, 2024

Describe the feature that you'd like

Implemented by #776

Why is this feature needed? What problem does it solve?

It would give users a choice, now they don't have any choice because there are 4 columns hard coded. What if they want 2 columns? They can if they have a footer based on how many footer widgets are active then the users can decide how many columns the footer is going to have.

Checklist

  • I have searched the issues and this feature has not been requested.
@crftwrk
Copy link
Member

crftwrk commented May 21, 2024

#776 (comment)

@stan1781
Copy link
Contributor

stan1781 commented May 22, 2024

I’ve now modified the structure of the footer code, which also enables the functionality to use footer widgets as required:

      <?php if (is_active_sidebar('footer-2')) : ?>
        <div class="<?= apply_filters('bootscore/class/footer/col', 'col-md-6 col-lg', 'footer-2'); ?>">
            <?php dynamic_sidebar('footer-2'); ?>
        </div>
      <?php endif; ?>

      <?php if (is_active_sidebar('footer-3')) : ?>
        <div class="<?= apply_filters('bootscore/class/footer/col', 'col-md-6 col-lg', 'footer-3'); ?>">
            <?php dynamic_sidebar('footer-3'); ?>
        </div>
      <?php endif; ?>

      <?php if (is_active_sidebar('footer-4')) : ?>
        <div class="<?= apply_filters('bootscore/class/footer/col', 'col-md-6 col-lg', 'footer-4'); ?>">
            <?php dynamic_sidebar('footer-4'); ?>
        </div>
      <?php endif; ?>
  </div>

@IceflowRE
Copy link

Is there a way to use the footers with templates parts instead of widgets? Currently our website is not using any widgets and is overriding the footer.php, but updating the theme is then more time consuming.

@crftwrk
Copy link
Member

crftwrk commented Sep 10, 2024

Is there a way to use the footers with templates parts instead of widgets?

Not yet, using template parts in header and footer is something for a major update later.

Currently our website is not using any widgets and is overriding the footer.php, but updating the theme is then more time consuming.

If you have overridden footer.php in your child, updating the main-theme is hassle-free.

Edit: If you have an idea to use template-parts without breaking changes for existing installations, a PR is highly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants