Change footer container class
-
Hi,
I want to change the class of a footer div from .container to .container-fluid
The footer is set up like
<div class=”colophon”>
<div class=”container”>
<div class=”row-fluid”>
</div>
</div>
</div>I think I need to use the tc_colophon_class filter.
I tried
add_filter('tc_colophon_class','pec_change_footer_container'); function pec_change_footer_container($content){ $content = "container-fluid"; return $content; }But this changes the <div class=”row-fluid”> to <div class=”container-fluid”> I’m one div too deep. Is there a way to select up to the parent element?
I’m a noob. Here’s the site
Thanks! This theme is great by the way!
-
Hi,
Use tc_colophon_display filter.You’re a champion Menaka. I can get everything I need done with tc_colophon_display.
Thanks!
Well the filter allowed me to put all my HTML in the right spot, but now my footer has a weird empty class attribute.
It’s <footer id=”footer” class>
Can i get rid of that ugly class?
Hi,
Probably something to do with your filter code. Can you show your code?yep, I’m sure I’m doing something wrong
add_filter('tc_colophon_display','pec_change_footer_html'); function pec_change_footer_html($content){ $content =' <div class="container-fluid"> <div class="row-fluid"> <div class="span4"><p class="pec-footer-title">Precision Eye Care</p></div> <div class="span4 pec-footer-left"> <p>Call for an appointment</p> <p>573-756-2020</p><p>Office Hours</p><p>Monday - Friday 9:00 - 5:00</p></div> <div class="span4 pec-footer-right"> <a href="https://www.google.com/maps/place/Precision+Eye+Care+Inc/@37.7755865,-90.4426714,16z/data=!4m2!3m1!1s0x87d8457aca6b1079:0xd1edcb4e28fa5776" target="_blank"> <p><strong>Find us on Google Maps</strong></p><address>Precision Eye Care<br>140 Westmount Drive <br>Farmington, MO</address></a></div> </div> </div> '; return $content; }Hi,
I don’t think it is due to your code. I see this in couple of other sites running the theme. This may not affect the site.<footer id="footer" class="">But you have shown it as
<footer id="footer" class>Is it class> or class=””>?
It’s
<footer id="footer" class>It doesn’t seem to be affecting the site, but it’s not very pretty. May not pass validation either.
I think it must be something I’m doing wrong with tc_colophon_filter
Are you use the tc_colophon_class filter as well? Then, probably you need to look there.
So I checked the preview of the theme here https://ww.wp.xz.cn/themes/customizr/
It’s the same on the example theme. <footer id=”footer” class>
Haha *face palm*
Thanks anyway Menaka, You’re seriously a champion of this theme forum.
P.S. does anybody know if this is even a real problem? It doesn’t seem to throw an error when validating the markup.
In the preview, I see
<footer id="footer" class="">Oh, i just checked it in Firefox and it’s <footer id=”footer” class=””> and In Chrome it shows <footer id=”footer” class>
Chrome must ignore empty quotes.
The topic ‘Change footer container class’ is closed to new replies.
