jQuery(document).ready(function($){
$(window).scroll(function () {
if ($(this).scrollTop() > 200) {
$('.logo img').attr('src','https://helioscard.com/wp-content/uploads/2020/12/logo-sticky.png');
}
if ($(this).scrollTop() < 200) {
$('.logo img').attr('src','https://helioscard.com/wp-content/uploads/2020/12/logo-1.png');
}
})
});
Month: December 2020
Register sidebar
function alpha_sidebar(){
register_sidebar(
array(
'name' => __( 'Single Post Sidebar', 'alpha' ),
'id' => 'sidebar-1',
'description' => __( 'Right Sidebar', 'alpha' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
}
add_action("widgets_init","alpha_sidebar");
Refresh/ redirect the browser with html tag
Refresh the browser with a meta tag.
Place the below in <head> tag and the page will refresh every 3 seconds
<meta http-equiv="refresh" content="3">
The contentattribute defines how often in seconds you want to refresh. You can also do redirect to another site. The below will redirect to google.com in 3 seconds.
<meta http-equiv="refresh" content="3; url=https://google.com/">