main content, site navigation, search

Simple page or section redirect in WordPress

Recently we had a chance to re-code the old client site: Graniti-Sušec. The site was first developed back in 2003. and was in fact the first commercial (non-personal) site done with web standards in Croatia.

At that time I was much more involved with ASP 2.0 and only heard about PHP. But since then — my focus shifted far, far away from ASP, and we decided not to fix the ancient codebase, but to move the backend to WordPress.

With the migration, we had to take care about the new URL scheme. The language part of previous scheme was full-length language name and therefor clumsy. The transition had to be seamless, so we don’t cut-off visitors landing from Google.

The solution is quite simple. All pages are organized as a child pages of two parents: /hr/ and /en/. We created two additional first-level pages — /hrvatska/ and /english/ — and set both pages’ templates to “Page Redirect”. This is how it’s done step by step: Continue reading »

Exclude articles from a category tree on your WordPress homepage

A nice way to manage articles visible only to registered users on your WordPress based site is to create one parent category exclusively for those posts and then create sub categories if needed.

Once you have the top, subscriber-only category, you will most likely not change it, and therefor you can use its category ID as an argument to construct your query, for instance query_posts(cat=-3).

This should exclude all the post from the category with ID 3 from the listing. However, this doesn’t exclude posts in child categories, and if we knew all the IDs, we’d expand the call to function like so query_posts(cat=-3,-4,-5).

In a real life, there are two possible issues. First, it’s a bad practice to rely on IDs for child categories, and the second one is that the default argument syntax cat=-3 won’t always work, due to plugins incompatibilities. Continue reading »

WordPress related articles by tags and/or categories

Here is a quick code snippet for displaying any given number of articles, related first by tags and optionally from the same category. This is by no means definitive solution, but might come in handy as a quick start.

Drop this inside the loop in single.php template, I suggest right behind the the_content() call. See it in action on the live site.

Use it as a base for more advanced features, or simply c/p. It’ll work :)

Continue reading »

Definition list for article comments or IM dialogue

HTML5 is the buzzword this season. Leading people in the industry are using appropriate class names for what will hopefully once become fully supported structural elements. Fully supported = fully supported by browsers.

In getting ready for HTML5 instead of element header:

<header>Site Name</header>

you’d write

<div class="header">Site Name</div>

For the inclined readers, here’s the HTML5 working draft. Quick overview of the element list will help you catch the train.

Definition lists, rediscovered

Definition list is a personal favorite HTML pattern for marking-up 2 or more related content elements. I found it especially useful when nested in list-items on search results pages and various tag/category listings. This raised a lots of controversy in the past and is still raising today, but I won’t go down that route now. Here’s just a quick example, just in case you don’t have a clue what I’m talking about: Continue reading »

How do you start your own web design workshops

So here we are — Alen Grakalić of CSS Globe fame and yours truly — preparing for our first very own web design workshop in Zagreb, Croatia. It’s all new to both of us and really, really exciting — even though the first one is just a case study, an experiment — to see if we (and the market) are up-to the task. Continue reading »

Mini Seedcamp Ljubljana 2009

Mini Seedcamp Ljubljana aims to connect the startup communities in Albania, Bosnia & Herzegovina, Bulgaria, Croatia, Greece, Macedonia, Montenegro, Serbia, Slovenia and beyond!

Overheard: Seedcamp is a competition for prospective IT and web entrepreneurs. Each of first five teams gets an investment of 50K Euro — plus: three months of training and business development lectures in London, UK — held by expert consultants from Google, Microsoft, Mozilla and Facebook.

Official site: Seedcamp Ljubljana 2009.

First look at the CSS support in Internet Explorer 8

Internet Explorer 8 is released last week. The IE team promised the browser will be more standards aware, similar to it’s major competition Firefox, Opera and Safari.

The trouble is — designers and developers don’t settle for current minimum, we are always into something new. So, by the time a giant vendor locks the feature list, a more flexible and agile competition goes miles away.

In the era of rounded corners/borders and transparency made possible purely with CSS, IE team missed to implement both, or at least in the form that wouldn’t require separate style-sheets files to conform to W3C guidelines.

I checked a few dozens of CSS-based web sites, and I’m not even sure anymore if everything works because developers payed special attention to IE 6 and IE 7, or is it because IE 8 is mature enough to render CSS layouts properly.

What works, what isn’t working

PNGs work without hacking. Rounded corners with CSS not. Text shadow — no. Alpha transparency is still possible only with proprietary filter property, for instance filter: alpha(opacity=10);.

Naturally, if you want your CSS to validate — this rule has to be extracted in separate file, preferably with conditional comments.

The old typeface order bug is still present, and easy font embedding with @font-face doesn’t work either, so if you prefer this method, read how to do it in IE.

BarCamp Zagreb II

A last minute announcement, but that is quite typical considering the ad-hoc nature of BarCamp Zagreb. This year’s event is taking place at the same venue, the Faculty of Electrical Engineering and Computing in Zagreb, Croatia at 23 JAN 2009.

BarCamp is a free event, there is no entry fee, but the attendees are encouraged to participate with questions and open discussion. Take a look at the schedule, consider submitting with your own presentation/panel and don’t forget to grab your seat!

Twitter Updates — Follow me

  • Updates are loading...

(Re)Public profiles

mi3 + Flickr + Twitter + Last.fm + Coolinarika + QBN + Krop CDB + LinkedIn + Croportal + Delicious

— How many typesetters does it take to screw in a light bulb?
— One, but you have to specify how tight you want it.

main content, site navigation, search