Last week was a monumental week for the Genesis community, as we made the Genesis Simple Share plugin available for our users to download. It was a long time in the making, and we are thrilled that it’s out in the open.
We’ve had some really good feedback since the release, and I’ve been asked a few questions on usage. What better way to address those questions out in the open so that all of you can benefit.
This tutorial will cover a question that Sridhar Katakam asked:
Is there a function to display the buttons so we can place where needed?
Through the Genesis Simple Share settings page, you have the option to display the buttons before the entry content, after the entry content or in both places. This is handled via filters, but there’s a way to display them elsewhere.
Go into the settings page and set the Icon Display Position to null, which is the default option. This will result in the icons being displayed in neither location. Don’t worry, we’re going to output them manually through a custom function.
Below is the code to reposition the Genesis Simple Share buttons:
Please note that this function overrides any options you may have in the settings page. In other words, this is where you control which social media services (and in which order) are output. Just look for the array in the code provided above.
You can place the Simple Share buttons on any of the available Genesis hooks. Sridhar placed them in the footer of his Genesis Customizations site.
For more information, check out the Genesis Simple Share Usage Tips wiki page that was put together by Nick Croft.
I hope that you enjoyed this Genesis tutorial. I have also published a list of Genesis code snippets, so feel free to use anything you see there.