AddToAny Share Buttons
[resolved] Breaks site feed (5 posts)

  1. Greenweb
    Posted 1 year ago #

    I had the following issue:

    XML Parsing Error: junk after document element
    Location: http://www.website.com/feed/
    Line Number 6, Column 1:<?xml version="1.0" encoding="UTF-8"?>

    The plugin is adding the following above the opening xml tag:

    <script type="text/javascript"><!--
    <?xml version="1.0" encoding="UTF-8"?>

    I fixed by adding the following: if(is_feed()) return; into the function A2A_SHARE_SAVE_footer_script()

    It would be great if this could be added into the plugin on the next update. I'll hang off on any updates until the issue is addressed.

    Thanks for the great plugin. :D


  2. micropat
    Plugin Author

    Posted 1 year ago #

    By defualt, this doesn't happen because wp_footer isn't loaded for the feed, but I can see some other plugin or theme changing this behavior. Can you pinpoint what's causing wp_footer to load?

    Regardless, thanks for sharing. The is_feed conditional will be rolled into the next release.

  3. micsu
    Posted 1 year ago #

    I'm using theme twentyeleven and the AddToAny buttons aren't going into the footer but at the end of entry-content div. That causes the buttons to appear on feeds. The feeds are in use in mobile software to read blog posts and the buttons break the layout.

    Is there another way to get those buttons in footer than modifying / adding a child theme to it?

    EDIT: I updated the plugin this morning to version 1.0.2 but that had no effect

  4. micsu
    Posted 1 year ago #

    Well, I guess this is basically a problem with JSON API while that doesn't return true for is_feed() (so I'm not using a regular feed). I'll try to figure out a workaround without having to modify the theme.

  5. Greenweb
    Posted 1 year ago #

    @micropat thanks for the update - works great.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • AddToAny Share Buttons
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.