All you have to do is add this code to the end of your theme’s functions.php file: add_filter( ‘post_thumbnail_html’, ‘wps_post_thumbnail’, 10, 3 ); function wps_post_thumbnail( $html, $post_id, $post_image_id ) { $html = ‘<a href=”‘ . get_permalink( $post_id ) . ‘” title=”‘ . esc_attr( get_post_field( ‘post_title’, $post_id ) ) . ‘”>’ . $html . ‘</a>’; return […]
Tag: auto
How to auto-scroll or manually to end of div when data is added
Auto-Scroll (every 5 seconds) window.setInterval(function() { var element = document.getElementById(“myDiv”); element.scrollTop = element.scrollHeight; }, 5000);
Javascript Refresh and CountDown Timer
<script type=”text/javascript”> function checklength(i) { ‘use strict’; if (i < 10) { i = “0” + i; } return i; } var minutes, seconds, count, counter, timer; count = 301; //seconds counter = setInterval(timer, 1000); function timer() { ‘use strict’; count = count – 1; minutes = checklength(Math.floor(count / 60)); seconds = checklength(count – minutes […]
How to Auto-Refresh Page with Javascript
<script type=”text/javascript”> function timedRefresh(timeoutPeriod) { setTimeout(“location.reload(true);”, timeoutPeriod); } window.onload = timedRefresh(300000); </script> Reference