A collection of WordPress snippets to make developers' lives just a bit easier. I'm not found of the current UI as it's not easy to skim, but the filter capability helps and I'm sure the site will improve as it grows.
php
WordPress Snippets
Tweet Nest
Finally, an easy way to have a browsable and searchable archive of your tweets. Even better, you can host it on your own site. Hat tip to @rands for the link.
Genesis Theme Framework – Hook Reference
DevCheatSheet.com
Cheat Sheets & Quick Reference Cards for Developers
Change the Thesis Doctype and Add Meta Tags
I love using Thesis because it lets me focus on content, while providing all of the design and development hooks I need to tweak the theme as I see fit. I’ve dug in a good bit, and while I’m far from an expert, I’m confident that anything and everything I want to do is available to me.
One thing I discovered early is that the default doctype is XHTML Strict, which is great in many respects, but can add some complexity given enough design changes and external data sources.
In 1.6 I was able to add some custom code to change the doctype to XHTML Transitional, simplifying some issues I was having with IE 8. Those same reasons necessitated that I include a new meta tag as well. Thesis 1.7 changed the implementation methods, so I’m documenting the new, right way to modify the doctype and add items to the page head in the hope that others might find it useful.
Credit: I learned about of this from girlie, who was kind enough to point me in the right direction on the Thesis forums.
Modify the Thesis Doctype
Simply add this to custom_functions.php in your Thesis directory:
/* !Custom Doctype */
function custom_doctype() {
return '< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
}
add_filter('thesis_doctype','custom_doctype');
Adding Meta Tags or Conditional Comments
This hadn’t occurred to me as I’m used to placing these directly in the code, but once girlie pointed me in the right direction I found it is a simpler solution.
- Go to the WordPress Dashboard
- Click Thesis in the sidebar – this should open the Site Options page. If it doesn’t, click the Site Options link
- Click the plus icon for the Additional Scripts box under Document Head
- Paste your tags, conditional comments and or anything else you’d like included in the
<head>
- Click the save button and verify that it worked on your site
Thinking About Thesis?
If you’re thinking about purchasing Thesis, and I highly recommend you do, I’d appreciate it if you follow this link when you want to learn more or are ready to buy the theme.