There is an updated version of this article for WordPress 3, see Move the search box to the header – WordPress 3 revision
The default theme in WordPress places the search box in the sidebar. Moving it to the header is relatively easy to do if you’re comfortable making minor changes to the code. The first thing is to find the path to the theme that you are using, for the default theme the path is:
Then using your favourite text editor open up the following files:
Note: Before you make any changes to these files make sure you have a backup
Next look for the following code fragment in sidebar.php which is used by WordPress to generate the search box (What this code does is to insert the contents of the searchform.php file at this point in the page. The searchform.php file contains the code to produce the search box and the search button).
Posted in Design, WordPress
Tagged CSS, HTML
In my spare time I like to think of myself as a cyclist, and as a cyclist my thing is riding cyclosportives which are similar if not the same as century rides in the USA. One of the popular rides close to my home in Oxford is the White Horse Challenge which has a route that climbs past several White Horse figures that have been carved into the chalk of the hills around here.
The website for this ride was built using Microsoft FrontPage 2003 and looks fine if viewed with Internet Explorer but looks a real mess if viewed with Firefox.
Outside of work hours while engaged on personal projects I tend to keep things running in a certain order and only feel comfortable if programs lined up in the same order each time in the taskbar (this is on a Windows machine, I guess this varies with Macs or Linux), so Eclipse would be first then Explorer then FireFox, IE, maybe Visual Paradigm, MySQl query browser, Photoshop, Word Excel Google Docs, UltraEdit (to keep some files out of Eclipse I open them with a separate editor). Then coming home from work I can pick up the threads and feel in control without having to spend loads of time getting in the groove again. Is this sort of behaviour common, is it more common with programmers? My wife is an academic and she has piles upon piles of folders on her desk filled with papers, yet she knows exactly where to find stuff, personally that would drive me absolutely bonkers as I would never find anything. I know what I am doing is slightly odd, so in Eclipse I always have the CSS file in the first tab, then the file I am working on, then maybe include files and so on.
Uploaded Images ‘Blurry’ with WordPress
Being new to WordPress I have been using the standard image upload facilities. After upgrading to WordPress version 2.7 the Flash uploader stopped working so I resorted to using the browser based version. This was annoying but not annoying enough to make me do something about it. Then I noticed that images which were fine when captured looked fuzzy when viewing the published article, specially when using Internet Explorer.
So what was going on? Well, for one selecting anything other than full size meant the images were being re-sized by the uploader and that reduced the image quality, you notice the difference in quality compared to re-sizing the images yourself in Photoshop.
Posted in WordPress
Data Modelling relationships between tables
The thing that got me writing this article was a question posted on Stack Overflow about data design, asking whether it’s better to use one big table or to arrange the data using multiple related tables. Having spent many years working with relational databases this seems obvious, it’s easy to forget this is not common knowledge and assume everyone knows this stuff.
How to install Visual Paradigm community edition
While writing an article on implementing Many to Many Relationships in databases the need for a diagramming tool became clear. At work Visual Paradigm is the tool for all UML and data modelling requirements, so it was good to read there is a free community edition that can be downloaded for personal use. The Community Edition page has a link on the left hand-side to download Visual Paradigm.