Visually split the primary sidebar in Genesis into two further sidebars, each with their own widget area.
Thesis
My tutorials written specifically for the Thesis theme on WordPress.
WordPress Breadcrumbs Class Alternative
This class is an alternative version of my previous WordPress Breadcrumbs Class.
Advantages Of The Alternative Version
- Less code – the class file and it’s usage is about 19% fewer bytes
- Multiple ways to instantiate – you can create the object and then set properties, or set the properties in an associative array when creating the object
- Easier to add future features – as there’s no get/set methods for each property, you can add a value into the _data array, and make use of it immediately later in the class.
- Uses common code – my other classes could be re-written to use the same common code, meaning an even smaller footprint if you used more than one of my classes.
Disadvantages
- Not so easy to use – while coders would have no trouble using this alternative version, I think the friendliness of the chained ->setX() methods of the original version is a big plus for those not confident with code.
WordPress Breadcrumbs Class
There are plenty of examples for how to add breadcrumbs to your WordPress site without needing a plugin, but all of them are normal functions. If you wanted two slightly different breadcrumbs, say, in different hooks, then you’d need two functions.
I decided to write a breadcrumb class that’s very easy to use, and I took my inspiration from the rockingwp.com’s Adding Detailed Breadcrumbs to the Thesis Theme (site appears dead) post as I also use the Thesis theme.
An alternative version of this class file that swaps a bit of user friendliness for lots of advantages is available at WordPress Breadcrumbs Class Alternative.
After Post Content for Thesis
function after_post_ads() {
if (is_single()) {
if (has_tag('Twitter')) { ?>
<p class="alert calltosubscribe">If you wish to see these <em>tweets</em> in real-time then please consider <a href="http://twitter.com/garyj" class="external" rel="external">following me on Twitter</a>.</p>
<p class="alert calltosubscribe">If you enjoyed this post, please consider <a href="#respond">leaving a comment</a>
and <a href="http://feeds2.feedburner.com/garyjones" class="external" rel="external">subscribing to the RSS feed</a> or <a href="http://feedburner.google.com/fb/a/mailverify?uri=garyjones" rel="external" class="external">subscribing via email</a>
to have future articles delivered to your feed reader or email inbox.</p>
<?php }
}
}
add_action('thesis_hook_after_post', 'after_post_ads');
/*Customize Author Bio After Posts*/
function author_about() {
if (is_single()) {
$user_description = get_the_author_meta("user_description");
if (get_the_author_meta("user_login") == "Gary") {
echo '<div class="author owner"><h3>About the Author</h3><img width="" height="" alt="Gary Jones" /><p class="author_bio">' . $user_description . '</p><p>Get social with Gary: <a href="http://garyjones.co.uk/twitter">Twitter</a> | <a href="http://garyjones.co.uk/facebook">Facebook</a> | <a href="http://garyjones.co.uk/linkedin">LinkedIn</a> | <a href="http://garyjones.co.uk/lastfm">Last.fm</a></p></div>';
} else {
echo '<div class="author guest"><h3>Written by a Guest Author</h3><p class="author_bio">' . $user_description . '</p></div>';
}
}
}
add_action('thesis_hook_after_post', 'author_about', 1);
Custom Comments Intro Filter for Thesis
Custom Comments Intro Filter
function custom_comments_intro_filter($output) { return str_replace('… read it below or <a href="#respond" rel="nofollow">add one</a>', ' — <a href="#respond" rel="nofollow">Add your comment</a>',$output); } add_filter('thesis_comments_intro', 'custom_comments_intro_filter');