WordPress using wrong template after AJAX loading
A tricky problem with my AJAX-search function. Wordpress decided to use front-page.php for loading extra AJAX-content. The problem was that this styled the content in a different way than I needed. After identifying the root of the problem (which takes time!), I looked around for a neat solution. What I came up with was overriding ...
Weekly changing random number
Simple task: How do we generate a random number that automatically changes every certain period of time. Of course, we use the week number when calculating the random number. Also, we have to cache a "large integer" that will not change until the end of the week to get a deterministic random-enough number. The result ...
WordPress 4.2
I just updated a multilingual multisite to Wordpress 4.2 - without opening my FTP-client, editing settings files, are even clicking away from the WP dashboard. It works just out of the box. Awesome! This is the first major Wordpress release of 2015. There are some noticeable improvements. What do I think about them? Changing themes directly ...
Flush Permalink Cache
I was working on some custom pagination functionality for Wordpress, and after much too long I found out you <em>have to flush the permalink cache</em>. Just go to Settings > Permalinks and click on "save" without making any changes. That's it. Check out Wordpress' great <pre>wp_rewrite</pre> class and endpoint functionality.