JS variable loaded using wp_localize_script is no longer available

TL;DR: Call the wp_localize_script after registering/enqueuing the script you are localizing. Recently (WP 4.1.4 / WP 4.2) my ajax scripts stopped working. I’ve noticed that it was caused by the fact that the variable for the ajax_url was undefined so for some reason it ws no longer loaded to the page. The reason turned out… Continue reading JS variable loaded using wp_localize_script is no longer available

Error 500 on a WordPress after an intensive hacker attack

Last couple of days we’ve had a website that is actively under DDoS attack. At some point I’ve noticed that the attack have stopped (or at least my notifications for it from the security plugin we use – Better WP Security) Opening the website I’ve noticed that it returned Error 500 so I started looking… Continue reading Error 500 on a WordPress after an intensive hacker attack

WordPress Empty Search Template

WordPress provides you with a nice and easy way to style the search page template using the search.php in your theme. However there is something that is relatively strange related to the searches in WordPress. If somebody hits the search button without having the search field filled in it gives you the blog archieve template… Continue reading WordPress Empty Search Template

Update to WooCommerce 2.0 and missing information for the product (in the front-end)

WooThemes released the new WooCommerce 2.0 recently and updating seems really charming with the new interface and other listed features. However sometimes updating won’t be the best thing you can do if your theme is made for 1.6. In non-technical words – if after the update some of the information is missing or is wrong… Continue reading Update to WooCommerce 2.0 and missing information for the product (in the front-end)

Adding a new currency to WooCommerce

Seemed to me that adding a new currency to WooCommerce would be extremely easy and wide spread which turns out is not the case. I couldn’t find any filter in the filter list with the hooks and filters list. Anyway I managed to find out that there are two filters for this: ‘woocommerce_currencies’  and ‘woocommerce_currency_symbol’.… Continue reading Adding a new currency to WooCommerce

How to make your slider have multilingual support using qtranslate

If you have a multilingual site with slider which uses the featured images for slider images and you want to make it support different slide images depending on the language you might want to follow these simple steps (or you can hack it your way). Problem one: WordPress doesn’t support multiple featured images. Solution Get… Continue reading How to make your slider have multilingual support using qtranslate