Simple, reuseable WordPress pagination without a plugin
Pagination might be one of the most seen ui-patterns on the web. The concept of showing just a limited amount of articles, posts or whatever and making the reader click through the rest, comes in quite a few variations. Googles search results are coming to mind or more advanced infinite scroll solutions. Naturally, WordPress implements [...]
Read more Tweet me Share me Plus meSimply related posts: Add thumbnails to the related posts widget
The Snippets Story The code above is simply adding the post-thumbnail before the related post titles if it exists. Works only with my Simply related Posts plugin
Read more Tweet me Share me Plus meAdd custom WP_Query parameters
The snippets story Some weeks ago I wanted to pass a custom parameter to the WP_Query object to change the where-query if the param was true. The problem was that the WP_Query object is already filtered when the posts_where filter is applied, so my custom parameter didn’t get through. I solved this by hooking into [...]
Read more Tweet me Share me Plus meFix cropping of custom image sizes in the WordPress image editor
The snippets Story If you are using custom image sizes in your WordPress theme you likely know the problem. Cropping, rotating or flipping an image via the WordPress image editor, works just on the original. After editing the image is not available in your custom sizes anymore, all you get in your theme is the [...]
Read more Tweet me Share me Plus meWalking up the Class-Hierarchy in PHP
The snippets story Yesterday I tried to call a function for every parent class of an object and get the results in an array. I didn’t found the solution instantly, so I thought that’s something for the snippets section. The function above takes an instance of a class and a class-methods name. Then it calls [...]
Read more Tweet me Share me Plus meHowto use array_map functionality on an associative array to change values *and* keys
First snippet for my collection.
Read more Tweet me Share me Plus me