The below code changes the “Before” theme location to use my ea_post_intro
hook.
You can also provide a filter, to which the buttons will be prepended (for “before” hook) or append (for “after” hook). You can also specify a different button style to use. Ex: $locations['before']['style'] = 'block';
For more information, see the source code.
/**
* Move Shared Counts
* @link https://www.billerickson.net/code/shared-counts-theme-location/
*
* @param array $locations
* @return array
*/
function ea_shared_counts_location( $locations ) {
$locations['before']['hook'] = 'ea_post_intro';
return $locations;
}
add_filter( 'shared_counts_theme_locations', 'ea_shared_counts_location' );