You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our template does some things directly using the the_content filter multiple times, which is causing the social buttons to show up in each of those cases. Perhaps we can add a setting that prevents the buttons from showing more than once?
If you'd like, I can put in a PR with that change.
The text was updated successfully, but these errors were encountered:
I don't think that really gets at the issue here. We only have one call to WP_Queryon the page; only one query. But in our footer, we are getting data (contact information) from options and running it through the_content in order to "texturize" the output, etc. So at that point in the template, WP thinks is_main_query() == true because we've never run any other WP_Query. However, we obviously don't want to keep displaying the social icons for every chunk every text we run through the filter.
Another idea to solve for this (beyond the "setting that prevents the buttons from showing more than once" suggested in the initial post) might be to add support for entering a custom hook name in the text field. Then we could hook into something more appropriate than the_content (at least for our situation).
I realize we could fire the buttons programmatically in our code, but I'm trying for a solution that doesn't marry our code to any specific plugin. Thanks!
Our template does some things directly using the
the_content
filter multiple times, which is causing the social buttons to show up in each of those cases. Perhaps we can add a setting that prevents the buttons from showing more than once?If you'd like, I can put in a PR with that change.
The text was updated successfully, but these errors were encountered: