I have many custom templates for different post types, and I am manually inserting a social share bar inside the 'entry-meta' footer in each of those templates. I need a simple centralized way to disable the social share bar without hacking into the plugin.
Basically I have this setup so far:
In functions.php:
update_option( 'show_social_bar', 'true' );
In my templates I have this check:
if( get_option( 'show_social_bar' ) === 'true' ) {
// show my social share links
}
If I need to turn the bar off, I just set the option to 'false' in functions.php. This somehow seems inefficient. Is there a more sensible way?
