A
A
Al Sm2015-12-17 15:24:39
PHP
Al Sm, 2015-12-17 15:24:39

How to enable sticky header by default?

Hello, in the header theme, when the page is scrolled, it is nailed to the top, the so-called sticky-header. Found the code in header.php

<?php
}
$evolve_sticky_header = evolve_get_option('evl_sticky_header', '1');
if ($evolve_sticky_header == "1") {

 // sticky header
get_template_part('sticky-header');
}}
 ?>

The theme also contains a sticky-header.php file.
What needs to be changed in the code so that the header is "sticky" by default when the page is opened? Or am I not looking at all? Please tell me, unfortunately I don't understand php at all :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WP Panda, 2015-12-17
@wppanda5

Look in the theme settings according to this - evolve_get_option('evl_sticky_header', '1');
the theme has a settings panel and there is a corresponding setting in it

I
Ivanq, 2015-12-17
@Ivanq

Maybe try that?

<?php
}
get_template_part('sticky-header');
}
?>

Replace exactly the code you gave

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question