Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there currently a way to use the AddToAny floating share bar?
Right now it appears that when I select a content type, I also have to select an area _within_ that content type for the sharing icons. What I'm looking for is the ability to add a floating share bar as in the link above for specific content types.
Happy to submit a PR if the functionality doesn't currently exist it would be welcomed!
Comment | File | Size | Author |
---|---|---|---|
#2 | wordpress-floating-share-bar-options.png | 146.53 KB | micropat |
Comments
Comment #2
micropat CreditAttribution: micropat commentedRight now a custom block is the best way.
In Drupal 7, Admin > Structure > Blocks > Add block > Text format: Full HTML > Block body:
In Drupal 8, Admin > Structure > Block layout > Custom Block library > Add custom block > Text format: Full HTML > Source > use the above example HTML code.
Patches for an AddToAny floating share block will be welcomed. :) For guidance, check out the floating bar fields that the WordPress plugins offers.
Comment #3
VladimirAusIs this still an issue?
Comment #4
micropat CreditAttribution: micropat commentedComment #5
chikeUsing Drupal 10.1.1, CKEditor wipes out the code at #2 if inserted through the UI. I haven't tried making the block programmatically.
Comment #6
micropat CreditAttribution: micropat commentedSince Drupal now strips empty elements in a Full HTML block, a workaround is to add some
span.a2a_label
text elements which are visually hidden by AddToAny.Just insert the code with Source enabled in editor toolbar and Full HTML set for Text format.
Comment #7
chikeThank you this worked!