Aug 15 2008

The Menu

Category: Berlitz Edinburgh Website, Wordpress, wp-andreas09steven @ 5:21 pm

The original wp-andreas09 template puts all the ‘pages’ into the horizontal menu and lists categories in the sidebar. Berlitz Edinburgh will have a lot of pages and I want those to be listed in the sidebar and to have only a few fixed pages along the horizontal bar.

First step was just to get the pages to list themselves in the sidebar. This was straightforward using the wp_list_pages function. I simply added this code to the sidebar.php file of the wp-andreas09 theme.

<li><h2>Main Menu</h2>
<ul>
  <?php wp_list_pages('sort_column=menu_order&title_li=&hierarchical=1'); ?>
</ul>
</li>

sort_column=menu_order does as the name suggests.

title_li= has a null value and means that Wordpress won’t insert the ‘pages’ title at the top of the list.

hierarchical=1 was supposed to indent the sub pages but didn’t. Here was my problem. But the problem was easily solved by modifying the CSS a little bit….

I then used Garrett Murphy’s Page Link Manager to add the functionality to ‘hide’ certain pages. These can then be linked to in my ‘fixed’ horizontal menu. This is perfect for giving you the flexibility to layout the menus as you want. Now all that’s left is to make the horizontal menu a fixed one (not associated with the Wordpress function that assigns pages to it).

First of all, I needed to remove said Wordpress function. It is in the header.php file:

<?php if (is_page()) { $highlight = ""; } else {$highlight = "current"; } ?>
<div id="mainmenu">
<ul class="level1">
<li class="<?php echo $highlight; ?>"><a href="<?php
echo get_settings('home'); ?>">Home</a></li>
<?php
if(function_exists("wp_andreas09_nav")) {
wp_andreas09_nav("sort_column=menu_order&list_tag=0&show_all_parents=1&show_root=1");
}
?>
</div>

Then I simply added my own page links:

<div id="mainmenu">
<ul class="level1">
<li class="<?php echo $highlight; ?>"><a href="<?php
echo get_settings('home'); ?>">Home</a></li>
<li><a href="http://www.berlitz-edinburgh.co.uk/?page_id=29">Where to Find Us</a></li>
<li><a href="http://www.berlitz-edinburgh.co.uk/?page_id=26">Contact Us</a></li>
</div>

The links were obtained by just clicking ‘view page’ in the Wordpress Editor.

So now I am blessed with a horizontal menu that can link to ‘hidden’ pages and a side menu that displays the pages included in the ’site navigation’. Even better…if I want one of the hidden pages to appear in both the horizontal menu and the side menu, I can just ‘unhide’ the page and then it’s done!

One problem….the sub pages are not indented in the side menu as I expected. Hmmm….guess that’s what I’ll have to figure out next….


Aug 10 2008

Choice of Theme for Berlitz Edinburgh

Category: Berlitz Edinburgh Website, Wordpress, wp-andreas09steven @ 10:56 pm

I love the design of this site which is the work of Tom Stardust. He really has an eye for beautiful web pages. But for the Berlitz Edinburgh site, I wanted a layout that was geared towards a more traditional website rather than the Wordpress style of this one. I needed look no further than my other favourite designer, Andreas Viklund.

Andreas has a range of templates; some of them Wordpress themed, some of them not. You can take a look at the range here. In particular, I chose the theme Andreas09 for the Berlitz Edinburgh site layout. However, this template was not available in Wordpress until….Ainslie Johnson ported it over. The download for the Wordpress-themed Andreas09 is available here. So Andreas and Ainslie are duly credited at the footer of the site. Both of them have done excellent work and I hope to donate to them at some point!

Some modifications were required to tweak this excellent theme into a corporate site.  I’m keeping track of such modifications here.


Aug 10 2008

Berlitz Edinburgh Site to be Based on Wordpress

Category: Berlitz Edinburgh Website, Wordpresssteven @ 10:53 pm

At the moment, I’m spending all of my spare time creating the new website for Berlitz Edinburgh. After spending many months dabbling in HTML, CSS and PHP trying to build the thing from scratch, I decided to move the whole project to Wordpress with an existing template.

It seems from a quick browse around the internet that a lot of people are thinking along the same lines. There are many people using Wordpress to develop ‘regular’ sites rather than blogs. I even noticed some web designers that only develop using Wordpress.

The advantages of using Wordpress are clear:

  • Anyone can edit the site. All they need is a username and password and they can edit content in the sleek, online Wordpress Control Panel. It’s similar to using Microsoft Word, which means people don’t need any coding knowledge to edit it and this will be very advantageous when we start commissioning translations for the site.
  • The added functionality from plugins is amazing! Secure contact forms, beautiful galleries, and probably most importantly, incredible Search Engine Optimisation tools!
  • It’s Open Source…and I love Open Source. I’ve been a Linux user for over a year now and have always loved and raved about OpenOffice, Firefox…etc. I know I can never create anything that could match the Open Source Community but one day I could contribute…..

So there you have it. I’ve decided to keep track of how I’ve implemented Wordpress to create a corporate site with an outstanding Content Management System. I also have to be careful as to whose work I am using for plugins…etc, so I’m keeping track of any extraordinary licensing that exists. I want to keep a record on this site so that other people can take advantage of this great technology.

By the way, my dabbling in HTML, CSS and PHP didn’t completely go to waste as the theme did need to be edited from time to time!