• Resolved staffordz

    (@staffordz)


    Please help I’ve been trying to do this for about 12 hours solid.

    I’m using the free version of customizr with the modern style, I have a child theme.

    I’ve copied everything from the parts/footer directory to the child theme in order to make my own changes. I’ve edited footer_credits.php and added 2 links and a line of text above “? 2017 sitename – All rights reserved”. They’re all inside their own div’s and a parent div that I’ve named “footer-parent”. I’ve tried everything to get that div to the center of the footer but I just can’t do it. Everything stays stuck to the left.

    Making css changes on customize/advanced options/additional css doesn’t do anything. I can’t even change the text color.

    I suspect it’s something to do with the colophon div as when I remove a line of code relating to that in web inspector, everything does indeed center, however that breaks other things in the footer.

    Please for the love of god help me. I’ve been blindly hacking away with a chainsaw at everything trying to get it to work. (I’ve not overwritten anything except a few small changes in footer_credits.php)

    Here is what I’ve been looking at, I’m probably completely off but I feel so close (yet so far away):

    footer_credits.php

    
    <?php
    /**
     * The template for displaying the footer credits
     *
     */
    ?>
    
    <div id="footer-parent" style="text-align:center;" align="center">
    <p>
    <div id="dis">
    <font color="808080" size="2">
    blah blah blah
    </font>
    </div>
    </p>
    <div id="t&c"> 
    <a href="www.xxxxxxxx.com/terms-conditions">Terms & Conditions</a>
    </div>
    
    <div id="pp">
    <a href="www.xxxxxxxxxx.com/privacy-policy">Privacy Policy</a>
    </div>
    
    <div id="footer__credits" class="footer__credits" <?php czr_fn_echo('element_attributes') ?>>
      <p class="czr-copyright">
        <span class="czr-copyright-text">&copy;&nbsp;<?php echo esc_attr( date('Y') ) ?>&nbsp;</span><a class="czr-copyright-link" href="<?php echo esc_url( home_url() ) ?>" title="<?php echo esc_attr( get_bloginfo() ) ?>"><?php echo esc_attr( get_bloginfo() ) ?></a><span class="czr-rights-text">&nbsp;&ndash;&nbsp;<?php _e( 'All rights reserved', 'customizr') ?>
    </div>
    </span>
    </div>
    

    and

    footer_colophon.php

    
    <?php
    /**
     * The template for displaying the standard colophon
     *
     * @package Customizr
     * @since Customizr 3.5.0
     */
    ?>
    <div id="colophon" class="colophon colophon__row row flex-row justify-content-between" <?php czr_fn_echo('element_attributes') ?>>
      <div class="col-12 col-sm-auto">
        <?php if ( czr_fn_is_registered_or_possible( 'footer_credits' ) ) czr_fn_render_template( 'footer/footer_credits' ) ?>
      </div>
      <?php if ( czr_fn_is_registered_or_possible( 'footer_social_block' ) ) : ?>
      <div class="col-12 col-sm-auto">
        <div class="social-links">
          <?php czr_fn_render_template( 'modules/common/social_block' ) ?>
        </div>
      </div>
      <?php endif ?>
    </div>
    

    What do I need to add or subtract to center my footer content without breaking anything? Any help would be sososososo much appreciated. I would just purchase the pro version and save myself this headache, but I can’t afford it, I literally have 0.13 in my bank account.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    You can do it using custom css.

    In footer_colophon.php, If you view it in your browser developer tools, you can see that there is a width and flex set to auto for class .col-sm-auto

    https://github.com/presscustomizr/customizr/blob/2b83d8ef2c02176e4bf5d485f780e575d8f060f4/templates/parts/footer/footer_colophon.php#L10

    Write you own custom css to set width to 100%, flex to 0 0 100% and add text-align center.

    I would just purchase the pro version and save myself this headache, but I can’t afford it, I literally have 0.13 in my bank account.

    Note: The pro version does not have option to center the footer credit in Modern style.

    Thank you

    Thread Starter staffordz

    (@staffordz)

    @denzel_chia

    Yesss mate! Thank you so much, that did it!

    I tried to place:

    .col-sm-auto {
    width: 100%;
    flex: 0 0 100%;
    text-align: center;
    }

    into the child theme’s style.css, that didn’t change anything so i just threw it in customize/advanced options/additional css and that did the trick!!

    You’ve saved me a lot of bother! Thank you. I really need to git gud at CSS and not be such a n00b.

    You are welcome.
    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How do I center Footer contents in free modern version’ is closed to new replies.