• Resolved Alexey

    (@dvascheta)


    Hello!

    I want to use custom set of buttons. What I do:

    1) Select radio “Custom button” in basic settings
    2) Go to https://www.addthis.com/get/sharing , choose the set and style I want, get code:

    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style addthis_16x16_style">
    <a class="addthis_button_facebook"></a>
    <a class="addthis_button_vk"></a>
    <a class="addthis_button_odnoklassniki_ru"></a>
    <a class="addthis_button_twitter"></a>
    <a class="addthis_button_google_plusone_share"></a>
    <a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a>
    </div>
    <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51f6acb90dd7263c"></script>
    <!-- AddThis Button END -->

    3) Return to wp admin area, paste whole code to box, save

    The problem that saving cuts “<script>” tags and code transforms to:

    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style addthis_16x16_style">
    <a class="addthis_button_facebook"></a>
    <a class="addthis_button_vk"></a>
    <a class="addthis_button_odnoklassniki_ru"></a>
    <a class="addthis_button_twitter"></a>
    <a class="addthis_button_google_plusone_share"></a>
    <a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a>
    </div>
    var addthis_config = {"data_track_addressbar":true};
    
    <!-- AddThis Button END -->

    Please mind standalone line in the end of the code:

    var addthis_config = {"data_track_addressbar":true};

    It is the part of cut <script> tags.

    Not sure if these two <script> lines are important, but I can’t keep them after saving.

    https://www.ads-software.com/plugins/addthis/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You actually need only this part:

    <div class="addthis_toolbox addthis_default_style addthis_16x16_style">
    <a class="addthis_button_facebook"></a>
    <a class="addthis_button_vk"></a>
    <a class="addthis_button_odnoklassniki_ru"></a>
    <a class="addthis_button_twitter"></a>
    <a class="addthis_button_google_plusone_share"></a>
    <a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a>
    </div>

    The <script> tags are removed for security reasons.

    Thread Starter Alexey

    (@dvascheta)

    Ok, thanks!

    Thread Starter Alexey

    (@dvascheta)

    Ok now. Works fine!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with "Custom button" feature’ is closed to new replies.