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 ...