Categories
Computing General Web Development

Fix WordPress ‘Press This’ 404 error

Apparently WordPress has a newfangled bookmarklet (newfangled to me) that allows you to quickly post about stuff you love. Bookmarklets are awesome, btw. But it did not work, most likely because I use the search-friendly, meaningful URLs. The post I Googled gives you an idea into how to fix it but it did not work for me. Try this code instead of the one he mentions, and follow his instructions:

javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.YOURDOMAINHERE.com/wp-admin/press-this.php',l=d.location,yz=l.href.replace(///g,'\/'),e=encodeURIComponent,g=f+'?u='+e(yz)+'&t='+e(d.title)+'&s='+e(s)+'&v=2';function a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=720,height=570')){l.href=g;}}setTimeout(a,0);void(0);

Enjoy.

Share
Share