Author: Alan

  • Is MapQuest a viable alternative to Google Maps for your website?

    Recently I have been coding some stuff using MapQuest rather than Google Maps. This was mainly spurned by the fact that Google Maps is no longer free – however of course we are talking about more than 25,000 impressions per day, so it is still free for most small website owners. Actually using the MapQuest…

  • Cloning a website

    To create a static copy of all website pages, for some reason that may be necessary, in linux   wget –mirror -w 2 http://www.example.com  

  • Sending data from php to javacript in WordPress

    It is often useful to send data from PHP to Javascript and WordPress gives you a method. You can use the localise script function to send data from php to javascript in WordPress coding e.g. $params = array ( “imageurl” => plugins_url(‘images/’, __FILE__), “post_id” => get_the_id(), ); wp_localize_script( ‘myScript’, ‘myparams’, $params ); and access it…

  • How to find out what theme you are using in WordPress

    Finding what theme is useful in some wordpress functions, if you are creating a bespoke system based on wordpress [php] $obj=wp_get_theme(); [/php] gets an aobject [php] $obj->template [/php] is the directory name that the theme is installed in

  • When working out what is going on in WordPress

      it is sometimes useful to be able to see what globals exist. This snippet of code shows globals and excludes a couple of the big wordpress objects that probably are not of any use [php] foreach ($GLOBALS as $key => $value) { if (($key!=’GLOBALS’) && ($key!=’wp_object_cache’) && ($key!=’wp_filter’)){ if ((!is_object($value)) && (!is_array($value))) { echo…

  • How to make a website

    In this post I try to cover how to make a website. Creating a website can be daunting for a new user or a start-up businesses that has no experience and no idea where to get a website. First you need to understand what a website is see here. If you want to create a website then there…