13
Feb 14

Making a custom column in WordPress admin sort by reverse order

It’s known and well-published that you can add custom columns to your WordPress  admin post overview screen. For instance see this article on the codex.Then you can make this custom column(s) sortable,  as described here.

For a recent project I had to make something like that, but including a checkbox with it. By default WordPress will start to sort your columns ascending, from low to high. This checkbox basically has two values, 0 or 1 ( boolean-like ) so starting ascending the posts who were not marked came first, so you had to click twice if you wanted to see tagged posts ( and why sort on a column like that otherwise ).

The solution is a small snippet that’s not really documented:

function checkbox_post_sortable($columns)
{

// second param is sort desc by default
$columns[“checkbox_post”] = array(‘featured’,1);

return $columns;
}

Usually in tutorials the column is defined by $columns[name] => title. By simple making it an array with the second position 1 WordPress will not sort your column descending when you click it first.

 


28
Sep 13

Simple Category Icons version 1.1

Today I released version 1.1 of my ‘Simple Category Icons’ plugin. I added some cool new features like:

  • Icons for any taxonomy in WordPress
  • Option to get icons directly for a term id
  • Add a custom class to the icon image
  • WordPress filters to customize output

If you need to categorize your theme icons by any term (category, tag, whatever ) in any image size; pick up Simple Category Icons today. Give a shout if you do, I always like to hear something.


19
Aug 13

New plugin – Add shiny icons to your categories

Recently I needed to add some icons to my categories on a project. Unfortunately it’s sometimes quite hard to find a good and easy to use plugin for simple functionality. After an search for some time I decided I could better spend my time on making it rather than siften through other peoples code.

Hence: Simple Category Icons. Which says it all I think. It’s all very version 1, which means that some features are still missing and coming time I will spend (hopefully) some time in making the plugin even more bad ass.

All the information you require is (hopefully) at the plugin page, otherwise don’t hesitate to drop me a line.


09
Apr 13

FeedWordPress Advanced Filters version 0.5 released!

After my november announcement of the plugin I was working on, I’m happy to present a decent version of Feedwordpress Advanced Filters.

feedwordpress_advanced_filters_screen_05

Decent that is with a nice interface, everything working and fairly stable. I have been using the plugin in development for a while already and a few people were interested at testing the alpha-versions as well. For me it works like a charm, so I’m pretty excited about releasing this plugin today.

You can get the plugin and view information about it at the plugin page!

 

 


16
Nov 12

Feedwordpress Filters (announcement)

Update: Feedwordpress Advanced Filters has been released, see this page.

Avid readers of this blog (hi mom!) know that I dive a lot into the Feedwordpress plugin. But still some things are not satisfying enough for me.

RSS is a great technique to get data, but unfortunately some of the sites I gather my feeds from are, let’s say, not very good. A lot of feeds out there need editing and molding to make it decent. This is one of the reasons I need Feedwordpress filters to shape the content a little bit.

Continue reading →


08
Nov 12

WordPress Update_option and serialize

I ran into this interesting feature yesterday I was not aware of. If you are trying to put options WordPress using Update_option serializing the data before actually causes unexpected behaviour.

The catch is that WordPress already serializes data send to the function. When invoking get_option the data will be unserialized. Obviously this causes an error if you try to unserialize the whole thing after that.

In short, just push an unserialized array unto update_option and everything will be fine!

 update_option("stuff",array('foo','bar'));
$foobar = get_option("stuff");

See this blog post for more backgrounds.


18
Oct 12

Case study: Nieuwszoetermeer.nl

In ‘case studies’ I will every now and then write about a specific site, it’s purpose and what you might learn from this. This could be own work or if I see fit some other pages on the web.

The purpose of NieuwsZoetermeer ( translated: News (from) Zoetermeer ) is to bring all sorts of local news to one page. In my former city local news is scattered around some local paper publications ( with horrible sites ) and ‘amateur’ sites bringing their own local news.

Besides there is no good source for information about the political situation. Like everywhere the traditional media is outside of elections not really interested. For a person who is not bound to one single party this would mean surfing across 10 sites already, just to see if there is local news.

In this post I will explain more about the techniques used behind this site and why.

Continue reading →


14
Oct 12

Moving WordPress from localhost to your host

You have developed a site using a WordPress installation on your local computer and now want to move it to your own domain space? This is a question that pops up a lot on the internet, while in reality it is not that hard to do. Moving WordPress just takes a few steps…

Continue reading →


04
Oct 12

WP Cron – A more reliable execution of scheduled posts and scripts

WordPress features and ‘pseudo’ cron function which loads at a certain interval when people visit your site. The Cron function is modeled after the linux/unix cron function which runs on most servers and check regularly for scheduled jobs to do.

The problem with the WordPress Cron is when nobody for a while visits your site. Or if you have a lot of heavy scheduled work to do this will slow down the user experience of your site.

There is a solution.

Continue reading →


02
Oct 12

Feedwordpress – Linking permalinks and comments to local or remote site?

Feedwordpress is a WordPress plugin which allows easy syndication of RSS-feeds to your blog, sidebar or both.

In Feedwordpress you are presented with the choice between linking to your local post when a excerpt is imported or linking directly to the remote site.

Often you will want to present a link to the original post, but also allow visitors to comments (and ping) on your site. The setting ‘ Point to local comment feeds on this website’ doesn’t seem to do much if you point your permalinks to the original site. This is a quirk which held many, including me, up for a few hours.

Continue reading →