Building useful features into your theme

My site has a theme which I created myself, and while it works, I often have to tweak the theme or use plugins to modify the appearance or behaviour. I’ve been looking at ways to modify my theme so that there’s less jumping around to make changes. Ideas include some basic SEO, gallery functionality, fields for analytics and feedburner, and widgets.

What features do you consider useful to build into a theme to reduce modifying it later or having to use plugins?

Related posts

Leave a Reply

6 comments

  1. It’s all site-dependent.

    I have a few core things I build in to any theme’s functions.php though:

    • Change logo on admin page to suit the client’s company
    • Hide WP-Stats smiley graphic
    • Hide WP.me short URLs and replace with their chosen provider
    • Add option for Twitter, Facebook, and Buzz buttons and ability to pull in Tweets
    • Google Analytics option
    • Minify JS/CSS

    … plus i’m forgetting some stuff, i’m sure.

    • Definitely some SEO options.
    • Built-in social sharing and stuff…
    • Built-in Twitter widgets to get your tweets…
      -Ability to add post thumbnails

    and much more depending on what you want to do with your website …

  2. I add the following to all my themes (with a nice set of drop-and-go functions in functions.php):

    • SEO options
    • Twitter integration
    • Remove WP-Stats smiley
    • Google Analytics
    • Add “XX,XXX words published so far” to the WordPress dashboard
    • No self pings (taken from the plug-in of the same name)
  3. Great topic!

    • Some form of control over featured posts (other than stickies)
    • Layout (sidebar) selector for Pages and Posts (useful for single posts/pages containing large media elements or code examples).
    • SEO Title/Meta Options
    • Styled announcement for maintenance notifications or alerts
    • Simple (Google) Analytics or daily stats link
    • Footer text with current year copyright
    • Footer menu support
    • Minify for CSS/JS
    • A/B Testing for homepage
  4. There are some things that already come with wordpress. For example jQuery and some jQuery plugins. You’ll find a list of them including the wordpress function wp_enqueue_script and the proper usage (incl. examples) over here: http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    Other things i alway use are functions that remove the_generator wordpress links and similar. For security reasons i tweak all scripts & styles loaded wp_enqueue_style and wp_enqueue_script so that the version number is set to zero to avoid that every possible hacker finds some already known security holes.

    Other plugins & Widgets:

    • Contact Form 7
    • Adminimize
    • Log depracated Notices
    • Login Lock down
    • Some related posts widget

    Hope that helps 🙂

  5. I always add the body_class() function to the <body> tag, which gives you a lot of CSS hooks to work with. You can do a lot with custom CSS depending on which page, post, category you’re in.

    In conjunction with that, I always add metabox to my post editing page that allows me to insert custom CSS on a per-post basis. That way I can declare custom styles on the fly if they’re only needed for that page, rather than editing the main stylesheet.