Blogging mechanics with WordPress

Now that I’ve been blogging for awhile, I thought I’d post a bit about the process. I understand that many people come here without any interest in the mechanics of blogging. If so, then just skip this post. Others will be familiar enough with technical issues that all this will seem way too simple. Again, just skip the post. If I make any mistakes in attempting to explain this, however, I’m hope someone with more technical knowledge than I have will let me know.

I started out, lo these couple of years ago, using the free and easy Blogger service provided by Google. The old version of this blog is still there; I’ll probably get around to deleting it at some point. After a couple of months I got tired of the limitations imposed by blogspot. I had my own domain and host; after a little digging I discovered that my host would install WordPress with just a button press. WordPress imports posts from Blogger, so I installed it and had it do that. I then had to manually import all of my images. That was kind of a pain, but not hard to figure out.

There are a number of free blogging platforms out there; WordPress is one of the most popular. It has its irritations, but it is quite functional and has been extended in various ways by a community of programers who mostly work for free (or for donations).

PHP, SQL, etc.

WordPress works on top of two pieces of software. The first is a database system called MySQL (SQL stand for “structured query language”). The database holds all of text of each post and other information such as the name of the blog, the date and time of each post, etc. WordPress itself is written in a programming language called PHP (which, so far as I can tell, originally stood for “personal home page” and now doesn’t really stand for anything). PHP is used to get information from the database and translate it into information that your web browser can understand. Every time you call up the front page of ATSH, the PHP program gathers information from the database and gives it to your browser. The program knows how many of the most recent posts go on the front page, so it figures out which to use based on their posting date. When you click on, say, a tag such as “egg tempera painting” it pulls every post with that tag from the database and constructs a page with those posts presented in chronological order. And so on.

Themes

WordPress comes with a couple of basic themes, but there are many others available for download. A theme is what controls the look and feel of the blog; the colors, the heading, the number of columns, the interface for moving from one page to another, and so on. Lots of people write WordPress themes and make them available for free. There are others (usually with more extensive or specialized features) that you can buy. I use a free and excellent theme called Tarski.

Plugins

Other people write plugins for WordPress. Like themes, there are many plugins available for free. Plugins extend the basic functionality of Wordpress. Like WordPress itself, plugins are pieces of software written in PHP. With most plugins, you install them, turn them on, adjust a couple of settings, and they just work. I have plugins that block spammers from leaving comment spam, for example. Another plugin lets commenters track replies to posts they’ve commented on. Yet another calculates which posts are most “popular” and lets me put a list of popular posts in the sidebar on the left side of the page.

Messing around with plugins

I like fiddling with computer stuff, so I’ve spent some time making the blog look the way I want. With some plugins, that involves getting more technical.

For example, you’ll notice that there is a randomly-selected image in the top corner of the sidebar. I use two plugins to make that happen. One, called Random Image, selects an image at random from posts in whatever category or categories you wish. You can then place this bit of code somewhere:

<?php randomimage(); ?>

That that strange-looking string of words and symbols tells Random Image to query the database for a lists of posts in the selected categories I’ve selected and figures out which of those posts are associated with a picture file. It then sticks one of those pictures in the place where I put the PHP code.

The other plugin I need to make this work is called “Executable PHP Widget.” A widget is an item in the sidebar on the left side of the page. WordPress comes with widgets that allow you to type some text to be displayed in the sidebar. Those standard widgets don’t do anything with PHP code—they don’t treat it as programming code to be executed. The Executable PHP widget acts just like a WordPress text widget, except that any PHP code in that kind of widget gets treated as code and executed. I pasted the above Random Image code into the widget, so that the code is executed and I get a random image in the sidebar.

I have no idea how to program with PHP. I didn’t need to in order to get these bits of software to work. That’s one of the great things about software such as WordPress. On the other hand, if you are more scared of code than I am, you can use WordPress without using a plugin such as Random Image. I do think it’s a nice feature for an art blog.

Those are just a few of the details. Let me know if you want to hear more about how this all works, or if this is a waste of time.

Also of interest

Tags: ,

Tags:
Separate individual tags by commas