Hello.
I'm Aleksandar Vacić, professional web developer and wine maker in the making.
Learn more about me or see what I can do for you.
First I started using categories as tags. Then got too many categories to be manageable. Then I converted them all to tags using converter from WP, which fucked up the categories. Then I got all those back to categories, which fucked up the tags.
I then tried to find a plugin that will help me deal with that mess and found none. There were few for older versions, but the ever changing WP internal structure that got more and more complex with each version forced those developers to give up.
So I did it manually. Deleted everything I did not want as category and thus ended up with 100+ posts in General category. Then one by one I assigned them to appropriate categories. Sucks, but it was the only thing that worked.
Does it really must be like this?
I did try to do it directly in the database. No way in hell. Posts are posts but are also pages. And maybe one more thing, not sure. Categories are not property of the posts or vice versa – instead they form a taxonomy. Which can be multiples for one cat/post pair. Each update is new taxonomy, you see. Really useful. And taxonomy is then one part of relationships table. The other part is object_id. Quite explanatory. You see object_id is …
Bah. I probably got half of the previous paragraph wrong. I can understand why no one wants to write a plugin that deals with that mess. I do hope Automattic has some sort of database re-factoring planned along the way. Otherwise this thing will self implode.
In one of my posts here I had a referral link for Google Adsense. Recently, Google sent an email around that it will stop using them. I read that with half a mind and dismissed it.
However, this has one interesting consequence in WordPress — this link confuses the_content() API call and it returns empty string. I removed this Adsense link (broken into several lines for clarity):
<a title="Ads by Google" href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l &num=0&client=ca-ref-pub-1148791019820431 &adurl=https://www.google.com/adsense/%3Fhl%3Den_US%26ai%3DBSsF-kUZjRc6ZFpWA-wK2rKTwCI2f8heZ0tCAAsWNtwEAEAEgyM 61BEDLFkicOVDBw_S-A2D8pvuN9CWgAZeVyP0DsgEFYXBsdXPIAQHaARBodHRwOi8vYXBsd XM6ODEv4AECgAIBlQITul4KqAMD &ai=BwfOLkUZjRc6ZFpWA-wK2rKTwCI2f8heZ0tCAAsWNtwEAEAEgyM61BEDLFkicOVDD64L CAmD8pvuN9CWgAZeVyP0DsgEFYXBsdXPIAQHaARBodHRwO i8vYXBsdXM6ODEv4AECgAIBlQITul4KqAMD">Adsense</a>
and things were back in normal. No idea what is exact problem, just posting for the sake of others having the same problem. Thank you goes to commenter David that alerted me to this.
I always forget the set of command line stuff I need to do when new version of WP is out. And always waste time figuring out what to do and which switches tar and cp needs. So, this is a reminder for the future.
wget http://wordpress.org/latest.tar.gz gzip -d latest.tar.gz tar -xvf latest.tar cp -r wordpress/* SITE/wpa
That should do it. Now off to upgrade rest of the blogs.
Note that wpa in the SITE/wpa above is my wordpress folder. Replace that with correct path for your installation.
If you read this in browser, you are most likely looking at the new theme. If not, use the delicacies at the bottom of the home page to change to aplus Lady theme.
This theme is technically identical to aplus theme: it has integrated time since and time of day plugins, support for gravatars, recent comments and blogroll display.
What’s new is that I changed the way design assets are loaded. Instead of pulling images from CSS, I used good old img tag and placed in inside of heading tags, where needed. Feels…strange. :)
Another thing is that Yasmeen’s photo is also simple img which makes it very easy to block. If that image is office-unfriendly for you, but you like the colours and would like to use the theme, then simply add the image to ad-block (whichever you use).
This also makes it very easy to change the image with something truly yours (when I actually offer it as download). The image can be 200px wide and unlimited in height, so you will have fun playing around.
This theme was a really long way in making. I started with something quite different and eventually changed everything but the main image.
The space at the top is perfect for ad placement, but I have not bothered to set any placeholders for it, so that would be your part to do.
I do not offer this theme for the download yet, nor I have any idea when I would. To be easily customizable, I’m thinking of implementing sIFR, but that will have to wait some time.
Knowing me, that would either be 1–2 days or several months. Hey — even in the state like this, it waited a good year or something…
The WP bug that waxed me so much in the past months is finally gone. At least here. Wherever I had " (double-quote) inside of pre tag, it would be outputted as \" — always prefixed with backslash.
Tonight I dug in into WP core and found that the problematic part is line 76 in file wp-includes/functions-formating.php. When you remove that line, all is displaying nice.
$pee = preg_replace('!(</pre><pre .*?>)(.*?)</pre>!ise',
" stripslashes('$1') . clean_pre('$2') . '' ", $pee);
Since wpautop function is not really required in my case (I write entire HTML for my posts), I instead opted to comment out this filter — it’s line 64 in wp-includes/default-filters.php:
// add_filter('the_content', 'wpautop');