Is it possible to relocate the single post sidebar element just after the main content (i.e. before opt-in form, author bio, or social share buttons) for mobile only? Social share buttons along with subscription form and author box are added with an after_content hook and 0 priority. Related posts are added with a before_comments_container hook and a default priority of 10.
it is possible to unhook the sidebar and hook it back in using the wp_is_mobile() template tag.
BUT, if your site is using Page Caching then it would need separate Caches for Mobile and Desktop.
The alternative is to unhook those other elements including the comments and hook them in before_footer then the sidebar will appear between those.
The before_footer solution requires multiple changes all around. I was wondering if I would be better off creating another GP aside element for mobile and setting that to appear after the content, hiding the original one on mobile?
Ok, I’ve created two sidebar elements with the content inside them as a reusable block and I am displaying the extra sidebar element on mobile only and after the content hiding the original one on mobile.