Here is a simple code snippet to show the top commentators or comments in the wordpres without any plugin. The code are given blow. function top_comment_authors($amount = 5){ global $wpdb; $results = $wpdb->get_results(‘ SELECT...
Sometime, you need to get a current page URL that is shown in the browser address bar. Here is a small code to get the current url. $url = (!empty($_SERVER[‘HTTPS’])) ? “https://”.$_SERVER[‘SERVER_NAME’] .$_SERVER[‘REQUEST_URI’] :...
If you want to change the iframe url from the iframe window, you can use this small function to change the url of the iframe. <script type=”text/javascript”> $(document).ready(function() { $(‘#clickToClose’).click( function() { window.parent.frames[“myframe”].location.href=’frame.php’; return...
If you want to control parent window’s URL from the child frame or child window you can use “window.parent” to control the parent window. The complete solution is: <script type=”text/javascript”> function check(url){ window.parent.location.href=url; }...
Find coordinates by moving around the map 1. Drag and drop the map to broad location. 2. Zoom in for greater accuracy. 3. Drag and drop the marker to pinpoint the place. The coordinates...
Open your theme’s function.php file and drag this PHP code in. <?php // This function shows the form fiend on registration page add_action(‘register_form’,’show_first_name_field’); // This is a check to see if you want...