Pssst. Want us to customize your theme for half the price?
As mentioned in our last post on adding a post signature to WordPress, Genesis Simple Hooks is a great plugin for any user on the Genesis framework as it allows you to try new, advanced features on your site without the risk of breaking it. It’s a diverse plugin but when used for a signature it can run into its own problems. All the same, let’s look at how to use Genesis Simple Hooks to add a post signature.
Why choose this plugin?
- Level of difficulty: moderate
- Pros: removes having a plugin just for your signature – this plugin is a lot more powerful and robust
- Cons: you’ll have a harder time customizing this if you want it to benefit multiple authors, depending on what other plugins you’re using, you may have to edit your functions files anyway
Install
In your WordPress Dashboard > Plugins > Add New: search for “genesis simple hooks” then install and activate.
Settings
Go to Genesis > Simple Hooks and you’ll be greeted with this settings page. What we’re looking for is actually a bit further down, though.
If you’re running a pre-HTML5 Genesis child theme, you’ll be searching for “genesis_after_post_content” to insert your signature.
On the other hand, if you’re using an HTML5 enabled child theme, look for the Entry Hooks section and “genesis_entry_content” will be the third option down.
Either way, you’re going to insert the same code into the box, ensuring ‘Execute PHP on this hook?’ is checked:
<?php //* Add a post signature if ( is_single() ) { printf ('<div class="post-signature ' . get_the_author_meta('user_login') . '"> </div>'); } ?>
Style
The styles will be the same as our ‘Add Signature (Reloaded)’ plugin
.post-signature { font: italic 14px Georgia; color: #CC0033; }
or adding a background image again
.post-signature { background: #fff no-repeat right center url('[IMG_URL]'); height: IMG_HEIGHT; }
or even to target a specific user, using their username
.laurengray { background: #fff no-repeat right center url('[IMG_URL]'); height: IMG_HEIGHT; }
Summary
Genesis Simple Hooks is a clean way to insert a signature into your posts, which can be styled to match your theme using your stylesheet. Though it can be more confusing to set up initially for use with multiple authors because you have to use WordPress functions, it is styled essentially the same way as the ‘Add Signature (Reloaded)’ plugin.
However, when used with some related content plugins, you may notice your signature is appearing below that plugin, rather the above it, directly under your post content. This is a problem that doesn’t occur with the signature-specific plugin, and, in most cases, cannot be fixed via Genesis Simple Hooks. Instead, you have to get into your functions file and change some code in there. And if that’s what we’re having to do, why shouldn’t we just go ahead and do it all?
So look out for another ‘Get Rid of that Plugin!’ and a pretty intense ride!
pssst.. Check out our sister brands!
Leave a Reply