Skip to content

Instantly share code, notes, and snippets.

@DiviThemeExamples
DiviThemeExamples / Divi Child Theme
Last active September 6, 2018 07:09
Divi Child Theme
To create a child theme for Divi Theme (Elegant Themes) you will need the following 2 files
style.css
functions.php
Divi Child Theme zip available at https://www.divithemeexamples.com/bare-bones-divi-child-theme/
@DiviThemeExamples
DiviThemeExamples / gist:4157272a6bde0707141d1ffa4867296e
Created October 23, 2019 09:12
Make Divi Theme Builder header sticky
<script>
// When the user scrolls down 50px from the top of the document, resize the header's font size
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
document.getElementById("myheader").style.position = "fixed";
} else {
document.getElementById("myheader").style.position = "";
}
@DiviThemeExamples
DiviThemeExamples / gist:878444d4904a161edde29930db2ab5b0
Created October 23, 2019 09:13
Make Divi Theme Builder header fixed
position:fixed;
width:100%;
top:0;
z-index:999;
// tutorial @ https://www.divithemeexamples.com/make-your-divi-4-0-header-sticky-or-fixed-with-the-theme-builder/