Archived topic
Issue not present with legacy hooks, but is with elements
19 replies · Started by Derek on July 31, 2018
So just when we fixed one issue by migrating to Elements, another issue popped up that wasn't present in legacy, but is in the new elements plugin haha. Sorry...
For some reason my social sharing buttons are appearing in my header :) I'm using the "After Header" Hook location, as I am for the other pages such as /blog or the categories (which is now working).
Thank you!
What code are you using to output the social icons?
Tom,
It's this plugin: https://wordpress.org/plugins/simple-share-buttons-adder/
Hi, have you changed the site? I can see the social icons and they are after the header?
Hi David,
Nope I didn't change the site, I just migrated all my old hooks to elements: then that bug happened :)
Hi Derek, on the posts page i can see the social icons and they are below the header. So a little confused.....
Hi David. Yes, indeed that is the bug. The social icons were not below the header before I migrated from gp hooks to elements. When I migrated from GP hooks to elements, my social icons moved below the header haha I have no idea how that could of happened which is why I'm reporting this bug. Something in the new elements hook plugin changed how that header worked and somehow moved the social icons. Ofcourse I do not want them under the header :P It's funny because migrating my hooks has actually fixed 2 other issues I had, but this is the only bug that happened as a result of the migration from gp hooks to gp elements. Any idea how I can fix this?
Check the hooks you were using:
Inside the header would have been the After Header Content.
Outside the header is the After Header.
Where are the icons supposed to be? Are you using a shortcode to output them?
Hi Tom,
The icons are supposed to be below the post content, which they are, but somehow an extra set of icons was placed under the header when I migrated it from gp hooks to gp elements.
Just looked through the code for that plugin. When it's set to automatically add the icons, it filters them into the_content filter.
What's strange is that the Page Hero isn't ran through that filter, so the plugin has no reason to add icons.
I'll do some testing and will get back to you.
Thanks!
So you're adding a BB element inside a hook after the header, correct?
What happens if you remove the BB element, and add some custom text? Do the icons disappear?
Maybe the BB element is calling the_content, which is causing the icons to display.
Hi Tom,
Thank you for looking into this. Yes you are correct.
If I remove the BB shortcode and add custom text the icons do indeed disappear. The thing is though...I've been using that header for some time now, well before I upgraded and migrated to elements, and those sharing icons didn't show up there until after I migrated from the legacy hooks. I thought maybe there was something in the way the new plugin handled these types of shortcodes from bb that caused the issue since it has also fixed some of my problems.
If this can't be fixed, do you have a recommendation for another lightweight plugin to display sharing buttons below the content? I know you developed a social sharing plugin of some type, because I used to use it on my old website, but I've lost it and couldn't find it via Google.
Thanks!
Hi Derek,
ill pass this onto Tom.
Regarding Social icons - Tom's Lightweight Social Icons provides icon links to social networks not Social Shares.
This is a super lightweight social sharing specifically built for GP:
It's possible that the BB module wasn't loading correctly in the legacy hooks (same issue we had with the styles not loading). Now that it's in Elements, it's actually loading correctly.
I really like this plugin for social sharing: https://wordpress.org/plugins/shared-counts/