Tôi đang chia Genesis Footer thành 2 phần. Tôi đang lọc hàm “genesis_footer_output”. Tôi đã thêm đoạn mã sau vào tệp functions.php
add_filter('genesis_footer_output', 'gd_footer_output', 10, 3); function gd_footer_output($output, $backtotop_text, $creds_text){ $new_output = '<div class="footer-left">' . $output . '</div>'; $new_output .= '<div class="footer-right">Website Design by <a href="https://genesisdeveloper.me" target="_blank">GENESISDEVELOPER.ME</div>'; return $new_output; }
Và đã thêm CSS sau vào tệp style.css
.footer-left{ float: left; width: 48.717% text-align: left; } .footer-right{ float: right; width: 48.717% text-align: right; } @media only screen and (max-width: 600px){ .footer-left, .footer-right{ clear: both; float: none; text-align: center; width: 100%; } }
Tôi đã nhận được đầu ra này.