WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
[resolved] Poor interpretation of the custom markup (7 posts)

  1. marudiniz
    Member
    Posted 9 months ago #

    Hi there,

    I'm having an issue with this plugin. I'm using WordPress 3.6.1 and the plugin version 3.5.2 (latest). I use the option Bottom Sharing Tool -> Custom Button, and I use the markup below:

    <div class="addthis_toolbox addthis_default_style">







    </div>

    I use the advanced option to show this on the home page, excerpts, categories and archives. In the home page it looks fine, but in the categories and archives pages it makes a sort of stairway, each button is in a different line. See the screenshot

    I looked at the markup generated and a
    is introduced after each social sharing button, it's like this:

    <div %s="" class="addthis_toolbox addthis_default_style">
    ...
    ...
    ...
    ...
    ...
    ...
    </div>

    If I change the markup code and remove the breaklines from it (making the custom markup a very long line), then it's rendered correctly, so I believe the plugin is converting each breakline (\n) in the textarea into a
    tag, and that's sort of not cool because I'm forced to write a terrible markup in the textarea that I can't read later on.

    I hope this is a good description and you're able to fix the issue. If there are more questions, please let me know.

    The link to the blog is http://www.happinessboutique.com/blog and I'm now using the markup in a single line to avoid this problem, but would really like to revert it to a cleaner one once this is fixed.

    Thank you!

    http://wordpress.org/plugins/addthis/

  2. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 9 months ago #

    Hello @marudiniz, I am not able to see the custom code you have pasted here. Can you repost it or send it srijith[AT]addthis.com?

  3. marudiniz
    Member
    Posted 7 months ago #

    Solved

  4. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 7 months ago #

    @marudiniz: Good to hear that!

  5. Vivek Srivastava
    Member
    Posted 6 months ago #

    @marudiniz Could you also tell for others, how you fixed the problem as I am facing the same problem with this custom code which I enter in custom code box where the sharing buttons are appearing like staircase on home page and writing some code on posts. I took the code from Add this website which is given below :

    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
    <a class="addthis_button_twitter"></a>
    <a class="addthis_button_facebook"></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-52d194d91e16826a"></script>
    <!-- AddThis Button END -->

    And the output is rendered like this : Snapshot(code appearing) and Snapshot 2 .
    Kindly tell how to fix this as it can help others too. I am using Twntythirteen as parent theme and WPMashthirteen as child theme.

  6. marudiniz
    Member
    Posted 6 months ago #

    @jimmoriarty the most straightforward workaround was to remove all of the spaces in the custom markup code, that made the staircase effect disappear. But I also patched the plugin to somehow get rid of the problem - unfortunately I don't have access to the code at the moment. It might be that the issue is solved in the current version of the plugin (that's what I was talking to srijith.v at that time). I haven't updated my plugin so I can't say for sure, but it's worth updating.

    P.S.: you linked the same image twice, so I know only about one of your problems.

  7. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 6 months ago #

    @jimmoriarty: Removing spaces might solve this issue for you now. But, as we are not converting new lines to html in our plugin, we would like to know why this is happening to certain users. Is it possible for you to send us the list of plugins you are using to srijith[AT]addthis.com?

    Also, there is a chance of this issue if you are using any text processing software in between to keep/edit the copy of code you grabbed from AddThis.com

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.