Howdy! This is the personal website of Swedish web developer Pär Thernström. You can contact me directly at par.thernstrom@gmail.com or through Twitter at twitter.com/eskapism/.

Besök arkivet för en lista med alla inlägg.

Tutorial and glossary added for Simple Fields

Skrivet onsdag 02 juni | Inga kommentarer

I’ve added a short tutorial and a short glossary for you Simple Fields users out there. I will also try add a screencast soon.

Simple Fields is WordPress Custom Fields on Steroids

Skrivet söndag 30 maj | 20 kommentarer

I’ve created a new plugin for WordPress that now is ready for beta-testing. It’s called Simple Fields (and it requires WP 3), and it’s gonna rule your world (at least it rules my world – your opinion may vary).

The purpose of Simple Fields is to make it easy to display different kind of fields (text, textarea, checkboxes, radiobuttons, files…) when you edit a post. Fields that an administrator of a web site can change and edit. And fields that you can use in your page templates to perform different tasks.

I think some examples is the best way to show you how cool and useful this plugin is:

Example 1: create options for a page

Say you have a client website where they want to show a ”share this”-button on some pages, but on some other pages they don’t. And of course the client wants to be able to change this on a per-page-basis.

With Simple Fields it’s easy: add a field group with a checkbox called ”Show share-button”. It will then look like this when your client edit a post:

Cool eh? Now say the client also wants to be able to choose the style of the the share-button – size, color, whatever. No problem: edit your Simple Fields and add a dropdown with all the options you want to be available.

The next time the client edits the post it will look like this:

Now that’s a lovely drop down, dontcha think?

Example 2: repeatable fields = super easy slideshows!

Now for something a bit more advanced nah still a piece of cake: repeatable field groups. This is one of the features I really really really like with this plugin.

It’s very common these days for a web page to have multiple images, often displayed as a slideshow, where each image have it’s own caption and destination link. In WP you usually set up your images through the use of the built in custom fields. However, you (I do anyway…) can run into problems when you want to change to order of the images or add alternative texts (for the visually impaired and for search engines).

Using Simple Fields for this is so much easier and smarter: set up a new field group and add all the required fields. So something like this will get us started (ok, I went a bit crazy here and also added options for delay and transition effect, just to show off a bit!):

Wow, amazing! We can now add… one image to the post! But we want to be able to add any number of images to the post. Now this is where repeatable field groups come into action. We just change the Slideshow field group to be a ”repeatable field group”, and then edit the page again:

Wohaa! See the small, but yet huge, difference? Yes, we now have a ”Add”-link at the top. Click on that and you will get a new set of fields, like this:

See, now we have all required fields for two images. Want to have four images? Just click the add-link two more times and you’re done. Want to change the order of the images? No problem, just drag and drop!

That’s it for now

Ok, that’s it for now. I hope this short intro gave you some understanding of how this plugin works and what it is useful for. I would love if you took it for a beta-drive. And I would love if you gave me some feedback.

Download Simple Fields

You can download the plugin from wordpress.org.

Histcon.se lanserad

Skrivet tisdag 11 maj | Inga kommentarer

Ännu en sajt vi gjort på MarsApril har nu lanserats: histcon.se. Tror t.om. den lanserades förra veckan, men jag ville vänta på det officiella Twitter-meddelandet från MarsApril innan jag sade något.

Histcon.se är en webbplats vi gjort åt Södertörns Högskola och deras mångdisciplinära forskningsprogram ”Tid, Minne, Representation” som handlar om historiemedvetandets förvandlingar. Vad exakt det betyder vette fanken, jag vet att sajten blev torr och fin iaf! ;)

histcon.se

Bokdags!

Skrivet måndag 03 maj | Inga kommentarer

Ett rejält gäng med böcker landade på mitt skrivbord idag:

En rejäl leverans med böcker

Mest ser jag nog fram emot Designing with progressive enhancement och Javascript – the good parts. Hur som helst har jag några spännande bokläsarveckor framför mig.

Grym sida för WordPress-dokumentation

Skrivet lördag 01 maj | Inga kommentarer

Hittade igår fram till sidan wpdocs.labs.thedextrousweb.com som är en helt otroligt bra sida för att söka dokumentation kring WordPress. Både funktioner och källkod, vilket är bra för oss som ofta vill gräva lite djupare i WP:s inre och som tycker att ”The Codex” är lite väl sparsmakad.

Tidigare har jag ofta använt mig av xref.yoast.com som även har en bra ”sökplugin” till Firefox, men efter att ha använt den första länken i bara några minuter så känns den som en klart mycket bättre alternativ.

« Nyare inläggÄldre inlägg »