Month: October 2013

so i’ve been using this wordpress plugin that will help your site become multilingual called qTranslate. it’s awesome. it allows you to add different translations for menus, posts, pages, widgets, etc with a little bit of effort (of course, every project is different, some php coding may be required). here’s a fairly quick startup guide

the thing is, we only need the plugin for a set of pages and that’s it… not the most ideal solution, but it’s working… or was

i found a random issue that no amount of googling could resolve… every page that didn’t require translation would display fine except for the below snippet of code

essentially, the code was using “get_posts” to display a page within a page (almost inception-like)

Read more »

so i’ve been running into a nagging issue with wordpress’ new instance of its media uploader (released in v3.5)

if i had a meta box with an image uploader, it would conflict with the standard “Add Media” button for the editor

previous code

uploader.js

jQuery(document).ready(function() {
var form_field;
jQuery('.button-upload').click(function() {
form_field = '#' + jQuery(this).next('input').attr('id');
tb_show('', 'media-upload.php?type=image&TB_iframe=true');
return false;
});

window.send_to_editor = function(html) {
imgurl = jQuery('img',html).attr('src');
if(!imgurl){
imgurl = jQuery(html).attr('src');
}
if (jQuery(form_field).length > 0) {
jQuery(form_field).val(imgurl);
}
tb_remove();
}
});

Read more »