WordPress: link image post to parent post

This post explains how to change the linking behavior of image posts for the WordPress default theme twenty eleven.

If you upload a gallery in WordPress and insert it in a post, each of these images will get their own post. In this post, only that image will be displayed (and some meta information) and if a user clicks on it the next image in the gallery will be displayed if you use the WordPress default theme twenty eleven.

And here is the problem: the user does not expect to be taken to the next image in the WordPress gallery. Most likely a user just came from a search engine and wants to read the post that belongs to the image (and you probably want the user to do just that as well).

Talk #4: Moving WordPress to production Server

Oftentimes it makes sense to set up and develop your WordPress page locally and then move it to a remote server once everything works. This prevents downtime of the live page in case something goes wrong, makes development easier and is just good practice in general. Here is a short description how to move WordPress from a local computer to the production server. Exporting and Importing WordPress Database and changing the website url # 1.

Talk #3: PHP – Comma Separated List from Array

After we discussed how to create a comma separated list in twig last week, this week I will show you how to do the same in plain PHP. Simple Comma Separated List in PHP without trailing comma The easiest way to get a String in PHP from the elements of an Array joined by some character is to use the implode function: $my_array = array('string1', 'string2', 'string3'); $comma_separated_list = implode(", ", $my_array); // $comma_separated_list now holds the value "string1, string2, string3" from the array $my_array As you can see, implode takes an array and returns a string containing its elements separated by a character of your choice which in this example is a comma.

Server Change

I apologize for the downtime. There where misunderstandings with our previous hoster but now we have a new one and everything is up and running again.

Symfony2 Tutorial: Storing Data – Doctrine, Entities, Sql

This is the fifth part of the series Symfony2 Tutorial for Beginners which will describe the process of creating and managing persistable entities.

We will create entities that can be written in a database as well as edited, deleted and of course shown.