Skip to main content

customizing wordpress

Pia, My CatI've been experimenting with creating custom themes in WordPress, one of which is the interface of this blog. WordPress is remarkably easy to customize.

The first time I did this was for Dairy and Animal Science blogs. It is not what I would call perfect yet. It was also a tiny bit more complicated because

  1. I picked a theme that contained rather a lot of embedded styles that had to be pulled out of the php files.

  2. I created several php includes and moved them outside the WordPress instances so that I could manage the appearance of several blogs with just a few files.

  3. Ditto the css.

  4. Ditto the images.

  5. I created some new php functions and changed others, which isn't necessary in most cases.


Almost SpringFor the blog you are reading, I started with the Almost-Spring theme, designed by Becca Wei. Becca's style sheet is well organized and semantic, so it was easy to work with. I commenced from there.

I downloaded the files from wordpress.org/extend/themes. There are zillions from which to choose. Each consists of an image directory, a screenshot.png, several php files, and the stylesheet.

Except for minor tweaking, I was able to leave the php files alone. It was largely a matter of altering the stylesheet, replacing the images within their directory, and replacing the screenshot with one of the newly created theme.

File structure for each theme.


I added an icon file named pia.ico to the root of this directory, and placed the following code in header.php between the header tags:

ICO Code


Finally, I changed the footer to reflect the new design.

Since this blog is hosted at an ISP, I do not have direct access to the code, so it was a matter of zipping the directory and uploading it. I was then able to choose the new theme from the theme selector.

That's all there is to it.

One thing I noticed about the code generated by this and some of the other WordPress themes is that the XHTML throws a validation error until you create your first post, at which time the error disappears. This is because posts are listed in the sidebar using an unordered list, and a fragment of a list tag is tied in with a php variable. So until there is at least one post, WordPress generates a closing tag without an opening one. Create a post; eliminate the error.

A small thing, really.

One last point: If you decide to customize your own WordPress blog, do remember to validate your XHTML and CSS and fix any mess-ups. The world does not need yet another site with trainwreck code.

Popular posts from this blog

Plone Advocate Andreas Mantke to Lead Site-Administration Workshop at 2012 LibreOffice Conference

I just published this article at plone.org on Andreas Mantke, a deputy member of the Board of Directors of the Document Foundation for LibreOffice . Mantke led a workshop for new Plone site administrators in the LibreOffice community during its annual conference last week. See the full article at plone.org/news/andreas-mantke-to-lead-site-administration-workshop .

Announcing the 45th Eastern Primitive Rendezvous

The 45th Eastern Primitive Rendezvous takes place September 23-October 1, 2022.   For more information, visit the official EPR website and Facebook group . We will be hosting the 45th Eastern Primitive Rendezvous on our family farm, near East Smithfield, PA. The dates are September 23 - October 1, 2022.  This is a living-history event depicting 18th-century activities. Visitors can tour the camp each day from 10 a.m. to 4 p.m.  Tuesday, September 27 is School Tours Day, during which we welcome classes from all of the area schools. Campers need to preregister ( nrlhf.org/pdf/pre-reg.pdf ), and period-correct clothing and gear are required.  For the exact location and more details, visit the  official EPR website  and Facebook group . For those of you who attended the 2017 EPR, this is the same location.