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?
It’s all site-dependent.
I have a few core things I build in to any theme’s functions.php though:
… plus i’m forgetting some stuff, i’m sure.
-Ability to add post thumbnails
and much more depending on what you want to do with your website …
I add the following to all my themes (with a nice set of drop-and-go functions in
functions.php
):Great topic!
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:
Hope that helps 🙂
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.