Customising WordPress Using Templates

In order to customize a WordPress theme, you may need to decide which template file needs editing in order to provide a conditional display. Say you want to have a link to you favorite book retailers which only appears on your books page http://techcosupport.com/press/category/books/, then you may need to build a custom template for that page.

WordPress uses the Query String, the information contained within each link on your web site, to decide which template or set of templates will be used to display the page. If your visitor clicks on a link to a category page like http://techcosupport.com/press/category/books/, then WordPress looks for a template file that matches the category’s ID in the directory for the current theme. If it is missing, WordPress next looks for a generic category template file, category.php. Failing that archive.php and if that is missing the main theme template file, index.php.

In order to find out the category ID number go to Manage Categories and hover your mouse over your target category and the ID will show up in the link. Alternatively if you are editing a category, the ID will be displayed at the end of the url.

You then create your custom page with the name category-2.php in the case of http://techcosupport.com/press/category/books/. After that, when you display Books the custom page will display. Easy!

For more detail on the use of templates see Codex WordPress Template Hierarchy

Customising WordPress Using Page Templates

If you are considering customising WordPress, you may be interested to know that it can be configured to use custom Page Templates for different Pages. This means that several or all pages could have their own unique Page Templates and so appear completely different.

If you want to create a custom page template called MyTemplate, create a file called mytemplate.php. At the top of the file, put the following:
<?php
/*
Template Name: MyTemplate
*/
?>

Copy the content of another template (perhaps page.php or index.php) after the above five lines of code then you will only have to alter the HTML and PHP code, instead of creating it all from scratch. MyTemplate will now be available as a choice when you create or edit a new page. You can go ahead and customise this new template further without if affecting your default pages.

To select a template, there must be at least one custom Page Template available in the active theme. Once there is, toward the bottom of the Write Page administration panel (or on the sidebar, depending on which version of WordPress you are using) you will see there is a drop-down labeled Page Template. From there you can select which Template will be used when displaying this particular Page, and MyTemplate should now appear.

See Codex WordPress Creating your own Page Templates to find out how to create a custom Page Template.

NOMS Organization Ill-conceived, Incoherent and Incompetent

The House of Commons Hansard Debates for 17 Mar 2009, pt 0003, lists a question from David Taylor, Lab/Co-op for North-West Leicestershire, to the The Minister of State, Ministry of Justice, Mr David Hanson.

The question was “Last week’s National Audit Office report on C-NOMIS excoriated senior NOMS management for an information and communications technology project whose lifetime costs have tripled to £700 million in just three years. I exculpate the Minister, who is a very able man of great integrity, but what should be done about the lamentable failures of that ill-conceived, incoherent and incompetent organization? Perhaps the guilty parties in EDS, Syscon and NOMS could be locked up for egregious negligence as a pilot group in one of the Minister’s fabled Titan prisons — if there is one big enough.”

Einstein is reported to have said “the definition of insanity is repeating the same actions over and over, and expecting a different outcome”. Need we say more?

For the minister’s response see National Offender Management Service in Hansard

Aloha From Maui and the Pink Biker Chic

While off last week on a working trip to the beautiful island of Maui, in the State of Hawaii (well someone has to do the difficult jobs!) we bumped into Eldonna Lewis-Fernandez, a retired US Air Force veteran of 23 years. Adventurous, edgy and refined, Eldonna is affectionately known as the “Pink Biker Chic.”

Eldonna is a Harley riding bad biker chic, speaker, trainer, author, Girlie Girl who drives a GMC truck, works out, does yoga, loves clothes, shoes and anything PINK! That stuff you can get off her website – what her site does not necessarily tell you is that she is also a very impressive and inspiring person when you meet her face to face.

She trains & coaches women in male dominated environments to eliminate self doubt and be the girlie girl in charge of their lives. She helps teens create better choices and amplify self esteem. Wow! What a Résumé!

We are currently negotiating a full article on Eldonna, so watch this space! In the mean time, if you want to visit her website now click on Pink Biker Chic

NAO slams IT project’s rising costs

The National Audit Office has slammed plans for a multi-million pound central database of offenders that failed because of poor management and a lack of budget control. The spending watchdog said the abandoned IT project’s rising costs and delays could have been avoided if basic management rules had been followed.

Edward Leigh MP, chairman of the Public Accounts Committee, described C-NOMIS as a “spectacular failure” and commented “What they delivered was a master class in sloppy project management.”

Harry Fletcher, assistant general secretary of probation officers union Napo, said the programme had been “a scandalous misuse of taxpayers’ money”.

For more information on this report see BBC News

WordPress Configuration Tips

When Setting up WordPress for the first time there are a few things you may need to do

Switch off WordPress comment
There is a simple way to shut down the comment system on a WordPress site. Turn off the comments on the Settings, Discussion page, Default article settings, which will disable comments on new posts. Then turn off the comments for all your existing posts.

Switch on Search Engine friendly URLs
The default WordPress uses web URLs which have question marks and lots of numbers in them. To improve this, click on Settings, Permalink Settings and change Custom Structure to read /%postname%/ and then Save Changes.

More Advanced Customisation

To exclude a cagegory or multiple categories from the front page
To block a category from the front page, in the sidebar find <?php wp_list_categories(); ?> and change it to <?php wp_list_categories('exclude=1'); ?> . Find which category number by looking at the category list. To block multiple categories use a comma seperated list like <?php wp_list_categories('exclude=1,4,5'); ?>

To sort categories alphabetically and include only the specified categories use <?php wp_list_categories('orderby=name&include=3,5,9,16'); ?>

For more category configuration possibilities see Codex WordPress Categories

To restrict pages to authenticated users
Check out WP-Sentry

Institution of Analysts and Programmers Spring Seminar

This year’s Spring meeting of the Institution of Analysts and Programmers will be based at the Museum in Docklands, close to Canary Wharf. Since its regeneration Docklands has become a hub for high-tech business. It contributes a major slice of Britain’s wealth, and provides employment for a lot of IAP members.

The IAP Spring Seminars have become a bit of a do, with some high profile names from the IT industry appearing as guests or speakers. However, tickets are limited and much sought after, so call early to get yours. For more information including cost, timetable and speakers see the IAP News section

India protects traditional medicines from foreign patents

In the first step by a developing country to stop multinational companies patenting traditional remedies from local plants and animals, the Indian government has effectively licensed 200,000 local treatments as “public property” free for anyone to use but no one to sell as a “brand”.

The move comes after scientists in Delhi noticed an alarming trend – the “bio-prospecting” of natural remedies by companies abroad. After trawling through the records of the global trademark offices, officials found 5,000 patents had been issued — at a cost of at least $150m (£104m) — for “medical plants and traditional systems”.

If you want to read more of this story see India moves to protect traditional medicines from foreign patents

Diversity standard set by Avon and Somerset Probation

Avon and Somerset Probation Area have continued to set the standard within the Probation Service nationally for Diversity practice and have been ranked 18th overall in the top 100 employers by Stonewall. As a Probation Diversity Champion, they have demonstrated the success of their diversity policies and the extent to which they encourage job applications from lesbian and gay workers.

Justice Minister David Hanson said: “I’m really proud that Avon and Somerset Probation Area has been recognised for providing a welcoming place for gay, lesbian and bisexual people to work. It is crucial that those who serve society should reflect the diversity that exists. I know from personal experience that all probation areas in England and Wales are working to open their doors to a wider section of the community. I look forward to seeing more probation areas being recognised in the future.”

TechCo Systems provide technical support and web hosting services to Avon and Somerset Probation Area, and are proud to be associated with an organisation who’s culture reflects the rich diversity in society. If you want to find out about our involvement click here to contact TechCo Systems.

More on the fight against Leprosy

There is a new posting on the End leprosy Now website which outlines the effect of stigmatization on the efforts to end Leprosy. Check out The Stigma of Leprosy in India

We also came across a Research Article entitled Development and Validation of a Severity Scale for Leprosy Type 1 Reactions
The contributors conclude they have developed a valid and reliable tool for quantifying leprosy Type 1 reaction severity and believe this will be a useful tool in research of this condition. To read more about this research Click Here.

If you are interested in the campaign to End leprosy Now, please click on the link below and pledge your support.

Help to End leprosy Now