I'm helping to my friend a little with debugging his site, I'm not that familiar with php though so I could use some help.
if (has_nav_menu('header menu')) {
ht_header_menu_wp_nav(); // Header Menu
}else{
echo '<nav id="header-menu">';
echo '<ul>';
ht_no_wp_nav_notice();
echo '</ul>';
echo '</nav>';
}
ht_top_social_media();
ht_top_search_from();
$url=$_SERVER['HTTP_REFERER'];
$server=$_SERVER['HTTP_REFERER'];
$str=strstr($url,'www.sample.com');
if($str==""){
?>
<script>
$( document ).ready(function() {
$("#popup").show();
$("#warningpop").show();
});
</script>
<?php
}
It's a code for a content warning page, meaning that in the first time you enter the page: popup and warningpop are shown, the second time when you press the enter button the HTTP_REFER should be the address of the site and not show popup and warningpop. The thing is when you press enter you see popup and warningpop so you can't access the content of the site. Could someone tell me why? Thanks :)