Okay, there are plenty of places online with instructions on randomizing posts in WordPress; even WordPress tells how. But here's my version along with the code I used. Basically, I randomized the loop, and this required replacing the standard loop like this: Replace… with… That worked for me. (note: setup_postdata() prepares the $post array as …
Tag: wordpress
Jan 25
Curly quotes and WordPress permalinks don't mix
Sometimes curly quotes get copied and pasted into the title of our blog and WordPress just can't handle it. The problem lies in the permalinks and manually editing the permalink to get rid of curly quotes fixes it (but what a pain). In my search for an automated solution I discovered no hooks into this …
Nov 18
If you want to use Sendmail, install it, dummy!
Right…I must have forgotten to install sendmail, because mail wasn't working for WordPress. First, to verify that sendmail wasn't working I ran this PHP script (thanks to phpeasystep.com) <? // send e-mail to … $to="me@localhost"; // Your subject $subject="Test"; // From $header="from: your name <your email>"; // Your message $message="Hello rn"; $message.="This is testrn"; $message.="Test …
Jul 09
Hrmph, you mean GD wasn't installed?
I couldn't embed thumbnail sizes on my new WordPress install on my new Ubuntu server; I could only embed the original size (which was 3072×2048). The options to embed other sizes were just grayed out. It turns out that the default LAMP install doesn't include php-gd, the graphics library that creates thumbnails. Well… I guess …
Jun 29
It's not "stealing" (my new, stolen code wrapping technique)
I've heard it said that if you copy from only one source then it's called plagiarism, but if you copy from multiple sources then it's called research. Well, by researching Jeff Atwood's Coding Horror blog I found a great, simple way to frame code on Everything is Crap. First, the CSS: Then the Plugins… Raw …
Jun 24
Fixed slow Ubuntu in Hyper-V
So, Windows doesn't work well for WordPress. The more plug-ins I install, the more I realize that the world of WordPress is still a Linux-based world. We'll keep Everything is Crap on Windows because our needs are simple for this blog. But, in the future, all my WordPress are belong to Ubuntu. But, because Everything …
Jun 15
WordPress Uploads on Windows 2003/IIS6
I hit another snag moving WordPress to Windows 2003/IIS6; media uploads don't work. (Interestingly, this doesn't seem to be a problem with Windows 2008/IIS7.) The fix involves creating a temp folder, as Joseph Scott's blog explains: Edit upload_tmp_dir option in php.ini. In my case I created an uploads folder in the wwwroot: upload_tmp_dir = "c:inetpubwwwrootuploads" …
Jun 15
mod_rewrite for IIS6 and IIS7
One of the most famous pains-in-the-neck associated with installing WordPress is getting the Apache mod_rewrite to work. It's not automatic. I've talked about mod_rewrite already in a previous post, but I recently moved to a Windows WordPress installation, and that changes things. In Windows Server 2008/IIS7, WordPress tells you what you need to do. If …
Jun 15
Automated IIS WordPress Installer from Microsoft
Now that I know how to do it, I'm getting fed up with LAMP as a web platform. I much prefer Windows. (What can I say? I'm a Windows guy!) And I recently stumbled into the Microsoft Web Platform Installer. It makes installing WordPress embarrassingly simple. Just run the installer and it does everything for …
- 1
- 2