Hi,
i would like to add my title text to the footer, which should be formated in the following way (please see screenshot):
font-size: 38px;
font-weight: bold;
font-family: arial;
color: #222;
How can i do that?
kind regards Jak
Hey Jak73,
Try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:
#footer-title {
font-size: 38px;
font-weight: bold;
font-family: arial;
color: #222;
float: right;
top: -38px;
position: relative;
left: -10%;
}
Then add this code to the end of your child theme functions.php file in Appearance ▸ Editor:
function custom_script() { ?>
<script>
document.addEventListener("DOMContentLoaded", function() {
var titleText = document.querySelector("h1.av-special-heading-tag").textContent;
var footerTitleDiv = document.createElement("div");
footerTitleDiv.id = "footer-title";
footerTitleDiv.textContent = titleText;
document.getElementById("socket").appendChild(footerTitleDiv);
});
</script>
<?php
}
add_action( 'wp_footer', 'custom_script', 99 );
Best regards,
Mike
Hi,
use this code in your functions.php instead:
function custom_script() { ?>
<script>
document.addEventListener("DOMContentLoaded", function() {
var titleText = document.querySelector(".subtext.avia-standard-logo-sub").textContent;
var footerTitleDiv = document.createElement("div");
footerTitleDiv.id = "footer-title";
footerTitleDiv.textContent = titleText;
document.getElementById("socket").appendChild(footerTitleDiv);
});
</script>
<?php
}
add_action( 'wp_footer', 'custom_script', 99 );
Best regards,
Mike