Between this blog and my portfolio site, I deal with a lot of media files. They’re usually images, and, fortunately, WordPress offers a drill-down for this by default. However, I also often upload PDFs and ZIPs, neither of which are supported by default for search narrowing. Although I’m working on a more elegant solution, you can get the code for the first incarnation after the vid. Read the rest of this entry »
WordPress
Oh, WordPress, is there any way in which people can’t break you? I love you dearly, but sometimes, you’re a real pain in the ass.
Without a doubt, the most common reason why your WordPress installation suddenly stopped working is…you tried to change the home page. Yes, that’s it. Although, you probably already knew that, since you’re reading this. Here’s what [probably] happened, here’s what should have happened, and here’s how you fix it. Read the rest of this entry »
WordPress has two native functions for removing posts. The traditional function, wp_delete_post, originated back in the day and has been used for a long while by post-related plugins. A second function, wp_trash_post, was added in version 2.9. Here’s a short explanation. Read the rest of this entry »
I was trying to get my first customer for the BigFishGames plugin for WordPress up and running when we ran into an issue about iFrames. His theme wasn’t large enough to accommodate the game’s frame, so he requested a lightbox. Being a jQuery dummy, I ran to wp-prettyPhoto for help.
But, it didn’t work. =(
Oh, it opened it in a lightbox. But the height and width parameters weren’t working. According to the documentation, to use an iFrame you simply append
?iframe=true&width=[theWidth]&height=[theHeight]
Seems straight forward, but it wasn’t working. I tried the obvious – should I add “px”? How about “pixel”? Change around width and height? Then I tried the support forum, saw several other people asking the same question and no reponse. (Get to the point, Becky.)
Go into admin->settings->WP-prettyPhoto and uncheck . Problem solved. Have a nice day. =)
I’ve been having a conundrum with the company blog as of late. When I upload an image for a thumbnail, it works properly as long as I don’t use the built-in thumbnail capabilities. Assigning it to the thumbnail results in an oddly cropped image that looks entirely wrong.
Fortunately, a few minutes of spelunking in the settings resulted in the Media options. If you’re having the same problem, visit ->Settings->Media and unclick “Crop thumbnail to exact…” You can also control the default thumbnail size. I’m a bit amazed that the problem went on for so long before I found this (obvious!) solution.
I am not a Linux person. I like Windows. It does things for me and removes my need to think about what’s going on. Unfortunately, when my pretty little Dell decided to die a slow, excruciating death, I had no choice but to run Ubuntu on my husband’s craptastic spare HP laptop. Read the rest of this entry »
Ah, the mighty RSS feed. Straight from your blog to your subscribers’ readers. There are plenty of plugins for RSS feeds, like FeedWordPress, and WordPress also has a built in RSS widget that can display all sorts of goodies from blogroll feeds.
Maybe you, like me, want to add a page dedicated to an RSS feed. While you could definitely do this with any number of plugins, it’s easier to take advantage of a few native functions. Before you start, familiarize yourself with WordPress’ custom pages.
strtotime() is a function that, while widely discussed, is generally misunderstood. The application of strtotime() is far reaching. You can use it to get yesterday’s date (even when today turns into tomorrow) or the date of next year (even when this year rolls over). Read the rest of this entry »




5 Best Practices for WordPress Developers
Permalink | Shortlink | Comments (0) | Trackback | Filed in WordPress Tags: best practices, comment, development, functions, short tagIn a recent search for a WordPress chat plugin, I came across several “best practice” violations. Sometimes, ignoring best practices just gives future developers a headache. In other cases, it results in a inexplicable parse errors or PHP printing onto the user’s page.
The issues are almost always due to internal server configuration. Just like HTML and CSS, you should follow best practices in PHP to ensure compatibility on any server and save you – and your users – some trouble.
Read the rest of this entry »