How to modify the Tri floating sharebar

Tri Share Bar

The floating share bar is a little bar that displays share icons that float down the page.

How to enable/disable the Tri floating share bar.

You can enable or disable the floating share bar in the theme options page. By default the share bar is enabled.

How to change the content of the Tri share bar

The share bar is called from a function in functions.php. The function is tri_sharebar().

It performs a check to only display on single posts and also only if the share bar is enabled in theme options.

You can overwrite this by copying the tri_sharebar() function to your child themes functions and manipulate the if conditional how you would like.

Changing the content

The tri_sharebar() function gets the template part “share-bar” from the template-parts folder in the theme.

To make your own changes, simply copy the share-bar.php file to the template-parts folder in your child theme.

Once you copy the sharebar-php file to your child theme then you can make the necessary changes. This file has a #tri-share-bar div wrapping the title and anchors.

Add whatever content you like in here for it to show up in the share bar on your site.

Joseph Chesterton

Published by

Co-founder and Managing Director at Web3. You’ll find me taking care or all the technical and developmental aspects at Web3. I ensure every WordPress website we build is powerful and high performing so that you can have the fastest and best website investment possible.

Leave a Reply

Your email address will not be published. Required fields are marked *