Jump to content

Rewriting A Wordpress Theme


hussam

Recommended Posts

I am working on rewriting an old wordpress theme wp-andreas00 while trying to make it look and behave the same as much as possible. It is not a responsive template so just your old-school fixed width template.

The original theme was from 2008 and so contained a lot of deprecated functions and didn't support comment pagination, and didn't use wp_list_comments() (which meant using plugins for comment system like disqus didn't work) etc.. and I had to fix all that.

This is my first attempt at a wordpress theme so it far from perfect. It has been a very good learning experience and it led me to learn a lot of the wordpress framework, functions and APIs.

The source code is here: https://github.com/hussamT/wp-andreas00

Download-able zip: https://github.com/hussamT/wp-andreas00/archive/master.zip

 

So far the changes are:

  • New comments.php script.
  • Replaced most deprecated functions.
  • Replaced hardcoded date format with the_date() function so the theme can follow the wordpress settings for date format.
  • Added support for custom header banners.
  • Added support for post thumbnails (in single posts only to keep the front page clean).
  • Added support for custom menus.
  • Used wp_enqueue_style() for theme style sheet.
  • Added support for automatic feed links and removed hardcoded ones from header.php file.
  • Moved some common code from scripts to functions.php file.
  • Now uses post_class() for better control over post styling.

Comments and suggestions are more than welcome (especially stuff I did wrong and stuff I can improve).

Again, this is my first attempt at learning wordpress templates.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...