Home » Wordpress Theme

Category Archives: Wordpress Theme

Fundamental Website Setup Links

Design Dilemmas: CSS versus Tables

Sometimes CSS issues aren’t worth fixing. Over at our webcomic site Onezumi.com we had a new requirement that had us displaying 2 different comics on the index page at once. We also wanted to have the news posts associated with each comic also appear on the index (each comic has it’s own category), but side by side, not in a single loop.

The actual code to get separate loops working is a bit tricky, but not too hard once you understand the process. The major issue arose in getting both posts to appear and not overlap or conflict when appearing side by side.

The typical way to do this in a theme is to make both loops into separate HTML div’s, then do a float on them to get them to appear next to each other. The problem comes in when you need to retrofit this into a theme and CSS setup that wasn’t initially set up with this expectation.

The cascading nature of CSS is normally a good thing–the evil comes in due to different web browser compatibility levels, as well as weird “by design” issues with CSS itself. One of the most frustrating things with CSS is that due to the cascade, you may not actually easily know why something isn’t appearing correctly. While the element level can clearly have a specific CSS entry that tells it to do something, there are times when an overarching CSS entry (like a div level img setting behavior) can override your local entry. It involves which CSS entry the browser decides to do first, then second. You would assume that the local entry would trump the div level one, but that’s not always the case.

Anyway, back to my specific problem: The floats for the 2 news entries weren’t working properly. The CSS caused elements from both div’s to overlap, or get pushed under the other div. Or the background wasn’t being extended correctly behind both divs. It was turning into a mess.

Then the answer hit me: screw CSS for placement. While I’m sure many people will choke on this statement: Tables almost always work properly for placement, so use them sometimes where appropriate. In my case all I needed to do was make a simply 2 row table and place each loop inside each td.

Boom, works great and no issues for any browsers. And yes, I did use CSS to make the look of the table correct. A bonus is the mobile version of the site looks perfect since tables are easy things to get correct in even the crappiest mobile browser.

So, my lesson is sometimes it’s not worth ripping things apart when the simple solution is available.

Automattic: You’ve Just Got To Stop This Crap, Now!

Ok, I have to admit something. I’ve purposely been avoiding looking at WordPress 2.7. After all of the mess that’s been characterized by the last few releases of WordPress (and by mess I mean the constant interface changes, constant Plugin structure changes) I really didn’t want any more negative opinions about the direction things are going with WordPress.

But I went and downloaded the Beta 3 version today.

Goddammit, why do you have to go and do these things Automattic? The admin interface is a damn mess now. WHO THE HELL ARE YOU PAYING TO GIVE YOU THIS BAD ADVICE ON DESIGN?????

Seriously, is the intention to make it harder and more inconvenient to administer your site? Every update to the admin interface places things in more and more difficult places. The idea that you need to scroll vertically to get to things seems to be ingrained now. Guess what guys, most laptops now are WIDESCREEN, and a large percentage of your audience is using them primarily as their main computer. Placing links across the top of the screen makes way more sense that way down a page vertically.

And changing the jargon, terminology, and placement for sections every release is a plain crappy idea. What will we be calling Manage, Design, Appearance, etc. next release guys? Or will we actually have Manage again or now keep pages and posts separate?

Sure makes it real easy for us Plugin developers to maintain compatibility between releases guys–and yes, there are reasons why people don’t update fast or ever, and they aren’t all bad reasons.

I’m really tired of this mess. While I’m obviously capable of making the changes to the code needed for these constant interface changes, It’s becoming less and less worth it to me to do it for anything but my own sites and not bother updating general release Plugins like the ones I host here.

Here’s a clue: Plugin structure is meant to be a set up to allow people to reliably make additions to your basic system that will last over time. You don’t break this idea every release arbitrarily. If so, then that’s called a new version release, not a point release (so 3.0 is okay, but 2.7 is definitely not).

This is basic stuff. Please, let’s get with the program and not keep roiling users, Plugin creators, and Theme editors constantly, it’s getting a bit old now.

The Coming Flamestorm of WordPress 2.5

Hi everyone, A preview version of WordPress 2.5 has been posted at the WordPress.org website and from what I see after trying it out I expect to see a major flameup of epic proportions on their forum after it gets released. The most obvious and major issue is any plugin that adds fields to the database will almost certainly fail to work right in the new version unless updated specifically for it. They have altered the way plugin activation works–developers, you will need to specifically declare any global variables used in your activation function during table activation and creation to be global outside of the function (not just within it). This is not normally required and I highly doubt any current plugins do this–so they will all most likely fail to install their tables properly.

This points to one major issue I see with the WordPress development team–they have a very limited acceptance of the idea of backward compatibility. Starting with version 2.2 they have released new major versions that actively break backward compatibility on a wide range of plugins and themes. While I understand that this is sometimes needed for security reasons, in these cases it was simply because they redesigned the way something worked. This is where a “compatibility mode” or some other backward compatibility mode is really required.

In my plugin AWSOM Pixgallery I recently released a new version (4.5.x) that also saw a redesign of the way something works: image and gallery captions. What did I do? I added in a new setting called “Legacy Mode” that can be turned on to display captions in the old manner. It’s a crutch until people who are upgrading have time to update their captions to the new system. Actually, you don’t HAVE to ever update your captions, but in some cases some new features will require the new system to be operating to work–but that’s an option for the admin, not a requirement.

The real problem with this system of forced change is that it actively pushes people to NOT upgrade. Many WordPress users are not technical people. They don’t know, and don’t have time or want to know, how to go in and edit their theme files or plugins. In a perfect world every plugin writer would upgrade their stuff immediately, but in some cases plugins are no longer being developed, so they won’t get upgrades. This becomes a major issue when security upgrades are also involved, since many users who won’t upgrade now get left with insecure older versions of WordPress in place. If your site works now, but you try to upgrade and it bombs and you don’t know how to fix it, you are stuck and will probably just revert to the older one.

A “you should learn how to code” response to people will not work. A “Find another plugin/theme” response will not work. People like what they have and just want it to work.

I really like WordPress. I’m pretty much unaffected by these changes because I know how to program and make the changes necessary to get things to work right. But I also expect to get a huge amount of support requests because of changes to the way plugins now work. I’ll be updating my plugins to work, and will release new versions in the next day or so. But I suggest any developers out there get ready for the storm, cause it’s on the way.

WordPress 2.5 coming soon, get ready

WordPress 2.5 should be released soon (it was actually scheduled to be out already, but has been slightly delayed), so it’s time to get ready for upgrading. One major change to expect is the admin menu system in WordPress is getting a major overhaul. The direct result may be issues with how some plugins display their admin area pages. I believe that my plugins should be most unaffected, but since they are still making changes to the final look and feel, I won’t know until the release if I have to make any updates to the AWSOM series. If so I will try to get the corrected versions out as soon as possible after the release of 2.5.

As is typical with most WordPress upgrades, disable all of your plugins and switch to the default theme before doing the upgrade. Then turn on your plugins and theme one at a time and confirm they still work properly. With a major release there is a greater than average chance that older plugins will break–so I suggest doing this process slowly and really checking around your site after turning on each plugin and theme.

If you notice any issues with my plugins PLEASE send me an email or use my contact form as soon as possible so I can get things working again. Thanks.

Little Tips: When Upgrade Issues Happen, Don’t Panic

As I expected, the WordPress forums are clogged up with issues related to the upgrade to version 2.3. Many of you were either caught unaware (though I did predict it and posted about it here), or you were blindsided by the fact that parts of your theme or plugins you thought were safe were using the older now unsupported database calls. If you have been affected by the upgrade effect–either you get a totally whitescreen with nothing showing, or parts of your site don’t appear–DON’T PANIC! There are some things you can do to at least get your site running until you can fix everything back to how you want it.

1) First thing, if possible go to your Admin Plugins interface and deactivate all of your plugins. If you can’t log in to your site, the last resort way of deactivating your plugins is to go to your servers file system (either FTP or through a web admin interface) and delete all of the plugins from the plugins folder in the wp-content folder. Of course make copies of them to your local system first.

2) Second thing, if your site still looks crazy or won’t load, go to the Admin interface Themes area and select either the “Classic” or “Default” theme that comes with WordPress. Unless your database is totally hosed this will at least allow your site to load. It probably won’t look like how you had it before, but at least you won’t be down. In an extreme case where you can’t load your admin area go to the wp-content folder and delete your theme folder (of course, like above, make a copy first to your local system if you don’t already have a copy). Then rename either the “Default” or “Classic” theme to have the same folder name as your non-operating theme. This should get you back to being able to log in and see your site.

3) If it appears your database is hosed and deactivating all of your plugins and using either the classic or default themes still won’t allow your site to load….well, you DID create a backup database didn’t you? It’s not a fun process but you will need to reload your old database. I can’t give you a quick rundown on that, but there are plenty of Google findable sites that have PhpMyAdmin tutorials or Cpanel or whatever you use for setting up databases on your server. Once you have that in place you can copy your older WordPress files (you DID back up your original files didn’t you?) back to the server and do research on how to upgrade in a way that will work for how your WordPress is set up.

4) Go to the WordPress.org website and post on their forum for help. There are many people there already, maybe they have already posted about your issue and received a response that might help you.

5) Go to the developers sites for your theme and plugins and see if there are updates available. If the software is still being maintained it will hopefully have an update soon, if it’s older and no longer maintained….you’ll have to find a replacement that fulfills it’s function. The good thing is anything that is normally a good idea for a plugin or theme will have someone making it or redoing it for compatibility with the newest versions of WordPress.

6) In worst case scenarios you can hire someone like me to fix things for you. If you have some cash there are plenty of people that are willing to work for you to fix things up. WordPress.org forums always have people posting to have someone help them for a fee, plus I’m available too :)

In general it really shouldn’t be hard to get a working site back up in an hour or so. Then the long process is figuring out how to upgrade without getting the same issues again. In some cases you may have to go find a new theme file and redo how you had your old one set up. It’s a bummer, but that’s how this stuff happens sometimes.

AWSOM Powered