Hi..
Please make child theme directory and create a functions.php and style.css file.
Now copy below code and paste into style.css file of child theme’s directory.
.sticky-header{
top: 20px !important;
}
Also copy below code and paste into functions.php file of child theme’s directory.
add_action( 'wp_footer', 'sticky_header' );
function sticky_header(){
?>
<script>
jQuery(document).ready(function () {
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 150) {
jQuery('#header').addClass('sticky-header');
} else {
jQuery('#header').removeClass('sticky-header');
}
});
});
</script>
<?php
}
Save the changes.
Thanks.