• Resolved newguy321123

    (@newguy321123)


    I noticed the Share buttons share the page that the buttons are on when clicked.
    Is there a way to always and only share the home page, regardless of what page the user clicks the share icon?

    Thank you.

    • This topic was modified 2 years, 5 months ago by newguy321123. Reason: removed URL
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author micropat

    (@micropat)

    For sure. The quickest way to always & only share the home page using the default AddToAny buttons is add some code to your “Additional JavaScript” box in Settings > AddToAny:

    a2a_config.callbacks.push({
        share: function(data) {
    	data.url = 'https://www.example.com/';
    	data.title = 'Example Site';
    	return data;
        }
    });

    Just change https://www.example.com/ and Example Site.

    Alternatively, you can disable the default buttons and use the [addtoany] shortcode in page/post content like:

    [addtoany url="https://www.example.com/" title="Example Site"]

    Thread Starter newguy321123

    (@newguy321123)

    Perfect. Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Share Only Home Page’ is closed to new replies.