A quick fix some people might be interested in is how to sort the files listed on the theme editor page alphabetically. Some themes can have a large number of files and the default WordPress coding puts the list in no particular coding, making it difficult to track down a particular page. The addition of 2 lines of code can order the list to make it easier to work with.
- Save a copy of wp-admin/theme-editor.php to your local computer
- Backup the original version
- Open the local copy with a plain text editor (notepad works nicely)
- Around line 35 there should be a statement identical to:
$allowed_files = array_merge($themes[$theme][‘Stylesheet Files’], $themes[$theme][‘Template Files’]);
- After this insert the following two lines directly after:
$allowed_files = array_values($allowed_files);
- Save your copy and upload it back to the server
- Presto, list of files is now in alphabetical order
This will order by filename, but some files might display aliases like “Stylesheet” instead of styles.css, but it will still sort using styles.css, just be aware of that.
Now that the semester is over I’m going to devote some more of my time to my blog and also developing software. One of the first things I was going to do on my blog is add more links over on the right and realized it is a major pain in the butt to order not only the links but also the link categories themselves. WordPress has no facility for manually ordering the link categories so I changed that. My quick fix was adding a column to the database and then editing the select query to order by “my_order” instead of whatever it was doing.
My plan is to develop a plugin to add this functionality because it is sorely missing and the weakest point of WordPress that I have found. I’ll update as I work on that and hopefully I can get it released to the WP community for others to use.
Just like the Internet, Al Gore didn’t invent it. Some of you might not be terribly nerdy/geeky/techie people, but since you are here looking at this site you are using the Internet, this should be of interest to you. If anything it will make you smarter and in a few years you can impress your friends by saying “Eh whatever, I heard about AJAX back in 2005, big deal.”
AJAX uses technology behind the scenes to communicate with a server and returns information to the page you are looking at without refreshing the page, allowing it to become truly dynamic and interactive. The best way to further explain is to see it in action and decide for yourself the cool factor.
Google Maps, Google Suggest, Meebo
More information on AJAX